# Another question: unable to authenticate user \[admin\] for REST request, please advise

**URL:** <https://discuss.elastic.co/t/another-question-unable-to-authenticate-user-admin-for-rest-request-please-advise/112834>\
**Category:** Elasticsearch\
**Created:** [December 21, 2017, 2:20pm UTC](https://discuss.elastic.co/t/another-question-unable-to-authenticate-user-admin-for-rest-request-please-advise/112834 "2017-12-21T14:20:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Derrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/derrick/32/49944_2.png) [@Derrick](https://discuss.elastic.co/u/Derrick)\
**Post date:** [December 21, 2017, 2:20pm UTC](https://discuss.elastic.co/t/another-question-unable-to-authenticate-user-admin-for-rest-request-please-advise/112834/1 "2017-12-21T14:20:55Z")

</div>

Hi,  
I just setup ssl in ES5.6, and use highlevelrestclient to query data, but I got this error, anyone knows the reason? is my user:admin setup wrong.

{"error":{"root\_cause":[{"type":"security\_exception","reason":"unable to authenticate user [admin] for REST request [/trades,user\_trades/\_search?typed\_keys=true&ignore\_unavailable=false&expand\_wildcards=open&allow\_no\_indices=true&scroll=1m&search\_type=query\_then\_fetch&batched\_reduce\_size=512]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security\_exception","reason":"unable to authenticate user [admin] for REST request [/trades,user\_trades/\_search?typed\_keys=true&ignore\_unavailable=false&expand\_wildcards=open&allow\_no\_indices=true&scroll=1m&search\_type=query\_then\_fetch&batched\_reduce\_size=512]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}

---

<div class="post-metadata">

**Author:** ![shanec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shanec/32/4004_2.png) [@shanec](https://discuss.elastic.co/u/shanec)\
**Post date:** [December 23, 2017, 1:05am UTC](https://discuss.elastic.co/t/another-question-unable-to-authenticate-user-admin-for-rest-request-please-advise/112834/2 "2017-12-23T01:05:44Z")

</div>

I suspect you've either given the wrong password to the `admin` user or you've not granted the `admin` user's roles access to `trades` and `user_trades`. Check out the roles the user has and make sure it includes a role that has at least read access to those 2 indices.

---

<div class="post-metadata">

**Author:** ![Derrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/derrick/32/49944_2.png) [@Derrick](https://discuss.elastic.co/u/Derrick)\
**Post date:** [January 4, 2018, 9:04pm UTC](https://discuss.elastic.co/t/another-question-unable-to-authenticate-user-admin-for-rest-request-please-advise/112834/3 "2018-01-04T21:04:56Z")

</div>

thanks shanec,

yes, it's encrypted password. it works good now.

---

<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:** [February 1, 2018, 9:05pm UTC](https://discuss.elastic.co/t/another-question-unable-to-authenticate-user-admin-for-rest-request-please-advise/112834/4 "2018-02-01T21:05:31Z")

</div>

Closed on February 1, 2018, 9:05pm UTC

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