Use two building blocks in Microsoft Entra ID:
- A custom attribute in the directory schema (or custom security attribute) to hold
FederationID.
- A SAML claim mapping on the Enterprise application that emits that attribute as the NameID (or another claim) in the required format.
Below is the supported path from the provided material.
1. Create a custom attribute in Entra ID
If using custom security attributes (recommended for new scenarios):
- Sign in to the Microsoft Entra admin center as Attribute Definition Administrator.
- Go to Entra ID → Custom security attributes.
- Either select an existing attribute set or choose Add attribute set to create one (for example,
FederationAttributes).
- Open the attribute set and select Add attribute.
- Configure the attribute:
- Attribute name:
FederationID (no spaces or special characters, max 32 chars).
- Description: e.g.,
Federation identifier for SAML apps.
- Data type:
String (since the value is <IDStringFromIdP>:user.objectID).
- Allow multiple values to be assigned:
No (typically a single ID per user).
- Only allow predefined values to be assigned:
No (values will differ per user).
- Save the attribute.
High-level steps are summarized in the “Steps to use custom security attributes” and “Add a custom security attribute definition” sections in the context.
Next, assign this attribute to users that need it (per your business rules) using the “Assign attributes” step from the overview.
Note: The context only covers defining and assigning custom security attributes, not concatenating values. If concatenation is required (<IDStringFromIdP>:user.objectID), store the full combined value directly in the FederationID attribute for each user.
2. Add the attribute as a SAML claim for the app
Once the attribute exists and is populated on users, configure the SAML app to emit it.
- Sign in to the Microsoft Entra admin center as at least Cloud Application Administrator.
- Go to Entra ID → Enterprise apps → All applications.
- Select the SAML application.
- Select Single sign-on.
- In the User Attributes / Attributes & Claims section, select Edit.
To add the attribute as a SAML claim:
- On the Attributes & Claims page, select Add new claim.
- Set Name to
FederationID (or whatever the SAML app expects).
- For Source, choose the appropriate option for your attribute type:
- If using a directory schema extension (B2C-style custom attribute), select Directory schema extension, then pick the extension attribute from the
b2c-extensions-app as shown in the context.
- If using a built-in attribute or other mapped attribute, choose Attribute and select the correct source attribute from the drop-down.
- Save the claim.
If the SAML app expects this value as the NameID (User Identifier):
- Still under Single sign-on, in User attributes, change the User Identifier to the claim that carries
FederationID.
- If the app requires a specific NameID format, adjust it per the “Change the NameID format” guidance referenced in the context.
The context shows similar patterns for SaaS apps (Pega Systems, RStudio Connect) where custom attributes are added and mapped to specific SAML claims or NameID.
3. Verify attributes are present in the SAML response
If the app reports that attributes are missing or cannot identify the user:
- Confirm the
FederationID attribute is populated on the user object.
- Confirm the SAML claim mapping exists and is saved on the Enterprise app.
- Re-sign in and inspect the SAML response (using the app’s logs or a SAML tracer) to verify that the
FederationID claim or NameID is present and in the expected format.
If the app still cannot identify the user, adjust the User Identifier selection or NameID format as described in the troubleshooting section in the context.
References: