[QUESTION] How to take custom roles on UI with custom auth by AAD?
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm using SWA with custom auth by AAD. AAD configured to have custom appRoles for the users.
`"auth": {
"identityProviders": {
"azureActiveDirectory": {
"registration": {
"openIdIssuer": "https://login.microsoftonline.com/278XXXX27/v2.0",
"clientId": "a5eXXXX5ca",
"clientSecretSettingName": "ClientSecretSetting"
}
}
}`
Wasn't able to configure custom user attribute "userRoles" to have roles like they are supported in OOTB SWA auth approach.
So after succesfull login .auth/me returns only standart predefined userRoles for any account
`"userRoles": [
"authenticated",
"anonymous"
]`
After succesfull login I retrieve id_token in request to ... /auth/login/aad/callback

AAD has several custom Roles which can be encoded from the id_token like this:
`
"roles": [
"Admin",
"AppUser"
],`
How to set up AD to support userRoles in SWA style?
Or are there any way to catch id_token in JS code for further encoding to get appRoles?
Thanks
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.