How to change outgoing claims for SAML based SSO in Azure AD?

I'm using SAML based authentication. The identity provider (Idp) is Azure AD. My application as a Service provider (SP) have different claims/attributes as compared to what present in Azure AD. So, how can I change the outgoing claims in order to map those present in SP fields.

Assume attribute name in Azure AD is phonenumber and SP is expecting mobilenumber in the SAML response.

I tried what has been mentioned in this article but it didn't work for me. https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-saml-claims-customization


Solution 1:

i'm not sure what the docs say there, but i assume it would be similar to what i'm going to say, you go into the enterprise applications-> choose your app -> go to single sign on -> click edit on claims -> then click add new claim. -> name would be mobilenumber -> namespace.. you can leave it blank or put something random like http://schemas.xmlsoap.org/ws/2005/05/identity/claims -> source attribute -> user.telephonenumber probably.