If X-MS-CLIENT-PRINCIPAL contains the following (base64-encoded) JSON
{
"identityProvider": "test",
"userId": "12345",
"userDetails": "john@contoso.com",
"userRoles": ["role1", "role2", "author"],
"claims": [{
"typ": "SeriesId",
"val": 10000
}]
}
it will not be correctly interpreted as a valid client principal and thus the request will not be considered authenticated. The issue is with the val element, that contains an integer and not a string. Changing the value integer value 10000 into the string value "10000" allows authentication to work as expected