@David Pettitt
You can run the graph query as https://graph.microsoft.com/beta/users/<User's UPN>. You will get below result and you will be able to see the extension attribute in Azure AD user properties,
Now, to pass this attribute as claim for SAML application you will have to use Azure AD policy. You will have to create new Azure AD policy to include this extension attribute.
Once you create the policy you will have to link the policy to application service principal.
You can follow the steps mentioned below:
Create an AzureADPolicy.
New-AzureADPolicy -Definition @('{
"ClaimsMappingPolicy": {
"Version": 1,
"IncludeBasicClaimSet": "true",
"ClaimsSchema": [{
"Source": "user",
"ID": "extension_fe465646bca7445882882a8ac953af3e_employeeID",
"SamlClaimType": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/employeeid",
}
]
}
}') -DisplayName "CustomClaimsPolicy1" -Type "ClaimsMappingPolicy"
Attach the newly created AzureADPolicy to a specific AzureAD App's Serviceprincipal for which the token would be requested for.
Add-AzureADServicePrincipalPolicy -Id {object id of service principal} -RefObjectId {object id of policy}
To check if the policy is successfully added to the ServicePrincipal or not:
Get-AzureADServicePrincipalPolicy -Id "{object id of service principal}"
Once the policy is attached you can try accessing the application. Now you will be able to see the directory extension attribute as claim in the SAML token.
Do let me know if you have any further questions on this.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.