# Unable to authenticate user \[elastic\] for rest request

**URL:** <https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/246015>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [August 23, 2020, 11:15am UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/246015 "2020-08-23T11:15:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anil\_sunkesula](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anil_sunkesula/32/51133_2.png) [@anil\_sunkesula](https://discuss.elastic.co/u/anil_sunkesula)\
**Post date:** [August 23, 2020, 11:15am UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/246015/1 "2020-08-23T11:15:49Z")

</div>

I have launched Elasticsearch(Self-Managed) cluster using Azure marketplace. But not able to access elastic search.  
I tried with default user elastic and password which I gave while deploying the cluster.  
Getting error "unable to authenticate user [elastic] for REST request"

Here are the steps that I followed,

Selected Existing Virtual Network and Subnet  
Selected No for Kibana, logstash and jump box  
selected load balance as internal  
Selected yes for all data nodes are master eligible  
Choose no to configure TLS security

Once deployment is done, I am trying to access internal load balance on 9200 port  
But getting error "unable to authenticate user [elastic] for REST request" after I entered the username and password

I tried login through browser, using curl command and also through postman. Getting same error in all cases.  
`curl -X GET 'http://<loadbalancerip>:9200/_cat/indices?v' -u 'elastic:<elasticpassword>'`

I also tried redeploying the cluster with a different password, But still getting same error.

Could you please help me?

---

<div class="post-metadata">

**Author:** ![Abhilash\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhilash_b/32/40270_2.png) [@Abhilash\_B](https://discuss.elastic.co/u/Abhilash_B)\
**Post date:** [August 23, 2020, 12:17pm UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/246015/2 "2020-08-23T12:17:42Z")

</div>

Try using a sligthly modified curl request  
`curl -X GET 'http://elastic:<your-password>@<ip/domain>:9200/_cat/indices?v'`

Also please check if the protocol to be used in conjunction with Load balancers in Azure is https or http.

---

<div class="post-metadata">

**Author:** ![anil\_sunkesula](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anil_sunkesula/32/51133_2.png) [@anil\_sunkesula](https://discuss.elastic.co/u/anil_sunkesula)\
**Post date:** [August 23, 2020, 3:31pm UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/246015/3 "2020-08-23T15:31:15Z")

</div>

Hi Abhilash\_B,

Thanks for your suggestion.

I am getting could not resolve host when I execute

```auto
curl -X GET 'http://elastic:<your-password>@<ip/domain>:9200/_cat/indices?v'

```

FYI, My password has @ symbol.

http and https both can be used. we are using http protocol.

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [August 24, 2020, 3:05am UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/246015/4 "2020-08-24T03:05:48Z")

</div>

What do your Elasticsearch logs say?

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [August 24, 2020, 4:21am UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/246015/5 "2020-08-24T04:21:49Z")

</div>

My suspicion is that the password supplied for the elastic built-in superuser has not been successfully applied as part of the deployment process.

Let's continue the discussion for this on the issue opened on the repository: [https://github.com/elastic/azure-marketplace/issues/358](https://github.com/elastic/azure-marketplace/issues/358).

---

<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:** [September 21, 2020, 4:22am UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/246015/6 "2020-09-21T04:22:00Z")

</div>

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