# Role Mapping via App Role in Azure SSO

**URL:** <https://discuss.elastic.co/t/role-mapping-via-app-role-in-azure-sso/315831>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [October 5, 2022, 1:33am UTC](https://discuss.elastic.co/t/role-mapping-via-app-role-in-azure-sso/315831 "2022-10-05T01:33:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zesty\_Lemon](https://avatars.discourse-cdn.com/v4/letter/z/f08c70/32.png) [@Zesty\_Lemon](https://discuss.elastic.co/u/Zesty_Lemon)\
**Post date:** [October 5, 2022, 1:33am UTC](https://discuss.elastic.co/t/role-mapping-via-app-role-in-azure-sso/315831/1 "2022-10-05T01:33:01Z")

</div>

Hi,

New to Elastic here; seeking information on how to use a App Role on the Enterprise Application for Elastic SSO to assign a user to a particular role mapping;

We are using instructions;

> **[Set up SAML with Azure Active Directory | Elasticsearch Service Documentation...](https://www.elastic.co/guide/en/cloud/current/ec-securing-clusters-saml-azure.html#ec-securing-clusters-saml-azure-kibana)**

I can see in the SAML response my role information is present however my role mapping rule:

user field: group  
type: text  
value: \<\>

user field: realm.name  
type: text  
value: \<\>

Doesn't seem to be assigning the user to the role in Elastic. I'm unsure what I'm missing here or if perhaps I am missing some information on the Attributes & Claims side in the Azure app ?

Regards,

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [October 5, 2022, 2:57am UTC](https://discuss.elastic.co/t/role-mapping-via-app-role-in-azure-sso/315831/2 "2022-10-05T02:57:26Z")

</div>

It would be helpful if you could share more details, such as the SAML response, the actual role mapping etc. Please also format any code-like blocks with triple backticks.

---

<div class="post-metadata">

**Author:** ![Zesty\_Lemon](https://avatars.discourse-cdn.com/v4/letter/z/f08c70/32.png) [@Zesty\_Lemon](https://discuss.elastic.co/u/Zesty_Lemon)\
**Post date:** [October 5, 2022, 3:59am UTC](https://discuss.elastic.co/t/role-mapping-via-app-role-in-azure-sso/315831/4 "2022-10-05T03:59:53Z")

</div>

Hi Yang,

Thanks for the response, the attributes in my SAML response are;

```auto
			<Attribute Name="http://schemas.microsoft.com/identity/claims/tenantid">
				<AttributeValue> ********* </AttributeValue>
			</Attribute>
			<Attribute Name="http://schemas.microsoft.com/identity/claims/objectidentifier">
				<AttributeValue>7f46d0d0-49f1-4a74-87da-39661ea817f2</AttributeValue>
			</Attribute>
			<Attribute Name="http://schemas.microsoft.com/identity/claims/displayname">
				<AttributeValue> ******** /AttributeValue>
			</Attribute>
			<Attribute Name="http://schemas.microsoft.com/identity/claims/identityprovider">
				<AttributeValue>https://sts.windows.net/ ********* /</AttributeValue>
			</Attribute>
			<Attribute Name="http://schemas.microsoft.com/claims/authnmethodsreferences">
				<AttributeValue>http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password</AttributeValue>
				<AttributeValue>http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/windows</AttributeValue>
				<AttributeValue>http://schemas.microsoft.com/claims/multipleauthn</AttributeValue>
			</Attribute>
			<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname">
				<AttributeValue> ******** </AttributeValue>
			</Attribute>
			<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname">
				<AttributeValue> ******** </AttributeValue>
			</Attribute>
			<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress">
				<AttributeValue> *********** </AttributeValue>
			</Attribute>
			<Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name">
				<AttributeValue> ************ </AttributeValue>
			</Attribute>
			<Attribute Name="http://schemas.microsoft.com/ws/2008/06/identity/claims/role">
				<AttributeValue>elastic_pt_powerusers</AttributeValue>
			</Attribute>
		</AttributeStatement>~~~

Attached is a picture of the role mapping
![role mapping elastic|690x297](upload://tMEhFehCxYMRfpSL66vhOB9l2IK.png)
```

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [October 5, 2022, 5:35am UTC](https://discuss.elastic.co/t/role-mapping-via-app-role-in-azure-sso/315831/5 "2022-10-05T05:35:57Z")

</div>

Thanks. Could you please fix the role mapping link?

---

<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:** [November 2, 2022, 5:36am UTC](https://discuss.elastic.co/t/role-mapping-via-app-role-in-azure-sso/315831/6 "2022-11-02T05:36:07Z")

</div>

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