Hello @Matt Rasmussen , claims mapping policy PowerShell samples used the Azure AD PowerShell module which is being replaced by the Microsoft Graph PowerShell SDK. You can find samples for the latter in the Microsoft Graph documentation. Go to the Examples section and select the PowerShell tab for any.
Import-Module Microsoft.Graph.Identity.SignIns
$params = @{
Definition = @(
"{"ClaimsMappingPolicy":{"Version":1,"IncludeBasicClaimSet":"true","ClaimsSchema": [{"Source":"user","ID":"userprincipalname","SamlClaimType":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"},{"Source":"user","ID":"givenname","SamlClaimType":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"},{"Source":"user","ID":"displayname","SamlClaimType":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"},{"Source":"user","ID":"surname","SamlClaimType":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"},{"Source":"user","ID":"userprincipalname","SamlClaimType":"username"}],"ClaimsTransformation":[{"ID":"CreateTermsOfService","TransformationMethod":"CreateStringClaim","InputParameters": [{"ID":"value","DataType":"string", "Value":"sandbox"}],"OutputClaims":[{"ClaimTypeReferenceId":"TOS","TransformationClaimType":"createdClaim"}]}]}}"
)
DisplayName = "Test1234"
}
New-MgPolicyClaimMappingPolicy -BodyParameter $params
Alternatively you can use the Azure Portal UI as detailed in Customize claims issued in the JSON web token (JWT) for enterprise applications (Preview)
Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing similar issues can more easily find a solution.