I am trying to add optional claims for an app registered on Azure AD. I was following Documentation but the changes are not reflecting on the app's manifest. Still it is showing null or empty array like the below image.
I tried to follow this SO Question also but no luck.
$idTokenClaim = @()
$idTokenClaim += @([PSCustomObject] @{
name = "upn"
source = $null
essential = "true"
additionalProperties = @()
})
$optionalClaims = @{
idToken = $idTokenClaim
accessToken = @()
saml2Token = @()
} | ConvertTo-Json -Compress | ConvertTo-Json
az ad app update --id $($application.appId)--optional-claims '$optionalClaims'"
The JSON output for the $optionalClaims is :
Did I miss anything? Any help would be appreciated.


