I understand you are trying to get new Claim like Phone Number, City in access token and id_token
Steps to Create and Assign a Claims Mapping Policy:
1.Import the Microsoft Graph Identity Sign-Ins Module and Connect:
Install-Module Microsoft.Graph.Identity.SignIns
Import-Module Microsoft.Graph.Identity.SignIns
Connect-MgGraph -Scopes "Policy.ReadWrite.ApplicationConfiguration", "Policy.Read.All"
2.Create a Claims Mapping Policy Including Phone Number and City:
$policyDefinition = @('{"ClaimsMappingPolicy":{"Version":1,"IncludeBasicClaimSet":"true", "ClaimsSchema": [{"Source":"user","ID":"telephoneNumber","JwtClaimType":"phone_number"}, {"Source":"user","ID":"city","JwtClaimType":"city"}]}}')
New-MgPolicyClaimMappingPolicy -Definition $policyDefinition -DisplayName "IncludePhoneNumberAndCity"
3.Retrieve the Policy ID:
$policy = Get-MgPolicyClaimMappingPolicy -Filter "DisplayName eq 'IncludePhoneNumberAndCity'"
$policyId = $policy.Id
$policyId
4.Assign the Policy to a Service Principal:
New-MgServicePrincipalClaimMappingPolicyByRef -ServicePrincipalId <servicePrincipalId> -BodyParameter @{"@odata.id" = "https://graph.microsoft.com/v1.0/policies/claimsMappingPolicies/<claimsMappingPolicyId>"}
Expose an API and add scope like below:
Grant API permissions
"In the manifest, update the following:
acceptMappedClaims: true
requestedAccessTokenVersion: 2
Make sure to pass the scope as api://ClientID/.default
to generate the access token.
Then, try requesting both an access token and an ID token, ensuring that the signed-in user has provided values for those properties; otherwise, they will appear as blank."