Hi @Vladyslav Mursalov ,
Thanks for reaching out and apologies for the delay in response.
You can use custom mapping policy that modifies the claims included in tokens.
Note: This can be configured using powerShell only. We can't modify the claim by adding through "Attributes and Claims".
Claims can be customized for a specific application so policy can only be assigned to service principal objects.
Below are the steps to create policy and assign it to service principal.
1.First, you need to connect to Azure AD to sign to your tenant.
Connect-AzureAD
2.Use below cmdlet to create New Azure AD Policy to add Basic Claims "jobTitle".
New-AzureADPolicy -Definition @('{"ClaimsMappingPolicy": {"Version": 1,"IncludeBasicClaimSet": "true","ClaimsSchema":[
{"Source": "user","ID": "jobTitle","JwtClaimType": "jobTitle"}]}}') -DisplayName "BasicClaimJob-title" -Type "ClaimsMappingPolicy"
3.Run the following command to see your newly created policy and copy the policy ObjectId,
Get-AzureADPolicy
4.Then, assign the policy to your service principal. You can get the ObjectId of your service principal from Enterprise applications blade
Add-AzureADServicePrincipalPolicy -Id <ObjectId of the ServicePrincipal> -RefObjectId <ObjectId of the Policy>
Once policy has successfully assigned, then enable the AcceptMappedClaims to true in the Application manifest
Now you should see Basic Claims "jobTitle" appears in ID_Token (JWT token)
Similarly, you can add custom claims or other attributes as well using custom policy.
Hope this will help.
Thanks,
Shweta
Please remember to "Accept Answer" if answer helped you.