question

JakeMurphySmith-1350 avatar image
0 Votes"
JakeMurphySmith-1350 asked JakeMurphySmith-1350 edited

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

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

azure-ad-saml-sso
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers