# Custom Roles - Errors when saved reports/visuals, but created successfully

**URL:** <https://discuss.elastic.co/t/custom-roles-errors-when-saved-reports-visuals-but-created-successfully/88323>\
**Category:** Elasticsearch\
**Created:** [June 5, 2017, 7:30pm UTC](https://discuss.elastic.co/t/custom-roles-errors-when-saved-reports-visuals-but-created-successfully/88323 "2017-06-05T19:30:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jayanna\_Hallur](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@Jayanna\_Hallur](https://discuss.elastic.co/u/Jayanna_Hallur)\
**Post date:** [June 5, 2017, 7:30pm UTC](https://discuss.elastic.co/t/custom-roles-errors-when-saved-reports-visuals-but-created-successfully/88323/1 "2017-06-05T19:30:25Z")

</div>

Objective:

1. Create a read only role & user who should be able to login to Kibana and do all READ only operation like open the dashboard & monitor
2. Create a power user role & user who should be able to create their own kibana dashboards, create alerting using watcher APIs
3. Create SuperPower role & user to create own dashboards, user Watcher App for alerting, and use Machine Learning App for creation ML analytics..

ES & kibana version: 5.4.0

Steps:  
Created the power user role with following configuration and user..

POST \_xpack/security/role/standard\_poweruser\_v2  
{  
"cluster": ["monitor", "manage\_watcher", "manage\_ml", "transport\_client", "manage"],  
"indices": [  
{  
"names": ["\*"],  
"privileges": ["view\_index\_metadata", "read", "read\_cross\_cluster", "index"]  
}  
]  
}

POST \_xpack/security/user/poweruser  
{  
"password" : "changeme",  
"roles" : ["standard\_poweruser\_v2"],  
"full\_name" : "Power User for Jayanna"  
}

logged into Kibana with poweruser/chageme credentials..

Under Discover, I'm able to see the all index data.. but when I try to save it, I get an error  
===\> "Discover: [security\_exception] action [indices:admin/refresh] is unauthorized for user [poweruser]" ...  
But the REPORT is SAVED... when I click on OPEN, I can see search query saved..

Same with Visualization.. I'm open up already existing Visuals and with "save as new visualization" checkbox, when I save it, I get below ERROR, But it SAVED SUCCESSFULLY.  
===\> Visualization Editor: [security\_exception] action [indices:admin/refresh] is unauthorized for user [poweruser]

Whats the wrong with these configuration? Why the error is thrown but created successfully..  
Whats the right configuration for the above requirements?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 3, 2017, 7:30pm UTC](https://discuss.elastic.co/t/custom-roles-errors-when-saved-reports-visuals-but-created-successfully/88323/2 "2017-07-03T19:30:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
