Azure Entra External ID (CIAM) : Custom IdP

Krishna Gundam 0 Reputation points
2025-08-12T15:49:24.9133333+00:00

Hello !

in our CIAM tenant we have an external custom IdentityProvider using SAML 2.0 protocol, I've created a Sign-in flow to use this external-IdP anticipating the user creation happens upon successfully authenticated by the external-Idp.

Problem is : CIAM tenant is creating the User Object but the Assertions from SAML response are not mapped. I have tried mapping in the Enterprise SingleSignOn but no success. Only Email is mapped everthing else for example givename , surname which I have configured already are not getting mapped during user creation.

any help much appreciated. Thank you.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sreetheja Adusumilli 325 Reputation points Microsoft External Staff Moderator
    2025-08-26T16:36:36.23+00:00

    Hello Krishna Gundam,

    Thanks for posting your question in Microsoft Q&A!

    When a user signs in through your custom SAML IdP, the SAML response contains a bunch of user details (called "attributes" or "claims") like email, first name, last name, and so on. Azure Entra External ID needs to know exactly how to take these attributes and put them into the right place in the user account profile it creates.

    By default, Azure Entra will only automatically map the email address from the SAML response. All other details like first name (givenName) and last name (surname) need to be explicitly told to Azure by configuring claim or attribute mappings.

    This usually happens because:

    • The names of the attributes sent by your IdP are either different or not exactly matching what Azure Entra expects.
    • The Azure Entra configuration for mapping those attributes is missing or incomplete.
    • Sometimes, Azure Entra creates the user account first and may only update additional user details like names after further syncing or provisioning steps.

    Check the SAML attributes from your IdP

    • Use a tool like SAML-tracer or a browser’s developer tools to capture the actual SAML response when a user signs in.
    • Look inside the response and find the exact names of the attributes for first name, last name, email, etc.
    • Be sure the attribute names are exactly what you intend to map. For example, it might say FirstName or givenName or something else note the exact spelling and capitalization.

    Configure attribute mappings in Azure Entra External ID

    • Login to the Azure portal and go to your Azure Entra tenant.
    • Find External Identities > Identity providers and select your custom SAML provider.
    • Look for Claim mapping or Attribute mapping settings.
    • Here, add mappings so Azure knows to take the SAML attribute names you found and map them to Azure user properties. For example:
      • Map SAML attribute givenName to the user property givenname
      • Map surname to surname
      • Confirm the email mapping is correct as it usually is set by default.

    Check the Enterprise Single Sign-On (SSO) settings

    • Go to Entra ID > Enterprise applications and select your application.
    • Under Single sign-on > Attributes & claims, ensure that all required claims like givenName and surname are listed and correctly mapped to the expected attribute names sent by your IdP.
    • If they're missing, add new claims with the exact names from the SAML assertion.

    Use advanced custom claims mapping if needed

    • If the portal settings are not enough and attributes still don’t map correctly, you can use Microsoft Graph API to create detailed and customizable claims mapping policies.
    • This allows more control on how claims from SAML are transformed and matched to user properties during sign-in and provisioning.

    Testing

    • After making these changes, test by signing in with a user from your external IdP.
    • Check that the user record in Azure Entra External ID has the email, given name, and surname correctly populated.
    • If it still does not work, review the sign-in logs in Azure to see if there are warnings or errors related to claims mapping.

    Please Note:

    Mapping these attributes correctly ensures that your users have complete and accurate profiles after signing in. Without mapping, users might get created only with basic information, causing issues in your applications or services relying on user names.

    Microsoft documentation:

    Kindly let us know if the above helps or you need further assistance on this issue.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.