# Authentication to realm default native failed - Password authentication failed for xyz

**URL:** <https://discuss.elastic.co/t/authentication-to-realm-default-native-failed-password-authentication-failed-for-xyz/271759>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [April 30, 2021, 10:04am UTC](https://discuss.elastic.co/t/authentication-to-realm-default-native-failed-password-authentication-failed-for-xyz/271759 "2021-04-30T10:04:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ekta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ekta/32/55987_2.png) [@Ekta](https://discuss.elastic.co/u/Ekta)\
**Post date:** [April 30, 2021, 10:04am UTC](https://discuss.elastic.co/t/authentication-to-realm-default-native-failed-password-authentication-failed-for-xyz/271759/1 "2021-04-30T10:04:03Z")

</div>

Hi All,

Elasticsearch-version-7.6.2  
I have created xyz admin user for only monitoring the url. For that I have created one custom role and add that role into the user.

Below is my role code with the name my\_admin\_role  
{  
"cluster": ["monitor"],  
"indices": [  
{  
"names": ["all"],  
"privileges": ["read"]  
}  
]  
}

And create xyz user and assign that role to xyz user  
{  
"password" : "xyz123",  
"roles" : ["admin","my\_admin\_role"],  
"full\_name" : "",  
"email" : "",  
"metadata" : {  
"reserved" : true  
}  
}

But I faced the Authentication to realm default native failed - Password authentication failed for xyz warning in my elasticsearch logs.

can anyone help here?

Thanks in advanced

---

<div class="post-metadata">

**Author:** ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)\
**Post date:** [May 1, 2021, 9:25pm UTC](https://discuss.elastic.co/t/authentication-to-realm-default-native-failed-password-authentication-failed-for-xyz/271759/2 "2021-05-01T21:25:03Z")

</div>

Can u post the elastic logs?

---

<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:** [May 3, 2021, 8:09am UTC](https://discuss.elastic.co/t/authentication-to-realm-default-native-failed-password-authentication-failed-for-xyz/271759/3 "2021-05-03T08:09:15Z")

</div>

The typical explanation for that message is that you entered the wrong password for the user.

What is the exact call you are making to try and authenticate as the user?

---

<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:** [May 31, 2021, 8:09am UTC](https://discuss.elastic.co/t/authentication-to-realm-default-native-failed-password-authentication-failed-for-xyz/271759/4 "2021-05-31T08:09:23Z")

</div>

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