How to send a claim in a token as a boolean value?

Jake Murphy Smith 1 Reputation point
2021-10-15T10:51:25.403+00:00

Hi,

I am working with my team internally to send a value as part of an Azure token in a boolean format, we are not successful at present.

We are using a 3rd party product that requires us to receive a field of boolean type, but it is passing as a String in the token.

Can anyone recommend how we should create a claim in order for it to pass in the token as the boolean value true?

Here is the claim we have tried, but it has given an error of invalid value.

$NEW_CLAIM = '{ "ClaimsMappingPolicy":
{
"Version": 1,
"IncludeBasicClaimSet": "true",
"ClaimsSchema": [
{
"SamlClaimType": "uid",
"Source": "user",
"JwtClaimType": "uid",
"ID": "onpremisessamaccountname"
},
{
"SamlClaimType": "mail",
"Source": "user",
"JwtClaimType": "mail",
"ID": "userprincipalname"
},
{
“DataType”: “boolean”
"Value": true,
"JwtClaimType": "email_verified"
}
]
}
}'

The error we get:
New-AzureADPolicy : Error occurred while executing NewPolicy
Code: Request_BadRequest
Message: Property definition has an invalid value.
InnerError:
RequestId: 57a2b63b-63c8-42e1-ae4f-184a80b1c41d
DateTimeStamp: Mon, 11 Oct 2021 17:15:34 GMT
HttpStatusCode: BadRequest
HttpStatusDescription: Bad Request
HttpResponseStatus: Completed
At line:1 char:10

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.