Skip to content

SWA Users - support userDetails, userId from X-MS-CLIENT-PRINCIPAL payload #843

@yorek

Description

@yorek

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

Metadata

Metadata

Assignees

Labels

authbugSomething isn't workingswa-integrationchanges related to swa integration

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions