# SAML configuration with NameID as unspecified

**URL:** <https://discuss.elastic.co/t/saml-configuration-with-nameid-as-unspecified/222704>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [March 9, 2020, 12:02pm UTC](https://discuss.elastic.co/t/saml-configuration-with-nameid-as-unspecified/222704 "2020-03-09T12:02:33Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![AjitR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajitr/32/51311_2.png) [@AjitR](https://discuss.elastic.co/u/AjitR)\
**Post date:** [March 12, 2020, 4:02pm UTC](https://discuss.elastic.co/t/saml-configuration-with-nameid-as-unspecified/222704/3 "2020-03-12T16:02:35Z")

</div>

Thanks @ikakavas.  
I tried with attributes.principal: "nameid" but didnt worked.  
So i Used : attributes.principal: "[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name)"

Browser Asks to save SAML response.

F12 Developer Tools -  
Response Body -  
{"statusCode":401,"error":"Unauthorized","message":"[security\_exception] unable to authenticate user [] for action [cluster:admin/xpack/security/saml/authenticate], with { header={ WWW-Authenticate={ 0="Bearer realm=\"security\"" & 1="ApiKey" & 2="Basic realm=\"security\" charset=\"UTF-8\"" } } }"}

ES Logs :  
"[WARN][o.e.x.s.a.AuthenticationService] [SA145] Authentication to realm saml1 failed - Provided SAML response is not valid for realm saml/saml1 (Caused by ElasticsearchSecurityException[SAML content is in-response-to \_afe391812ba357beef3a6c11113b8b80f4bbd1c5 but expected one of])"

Not getting whats going wrong here here.

---

_[View the full topic](https://discuss.elastic.co/t/saml-configuration-with-nameid-as-unspecified/222704)._
