I am attempting to manage custom user roles for a Static Web App programatically via a built-in function for OpenId Connect to Azure ADB2C. It's got a built-in python serverless API. Here is my setup:
"auth": {
"rolesSource": "/api/get_roles",
"identityProviders": {
"customOpenIdConnectProviders": {
"aadb2c": {
"registration": {
"clientIdSettingName": "AADB2C_PROVIDER_CLIENT_ID",
"clientCredential": {
"clientSecretSettingName": "AADB2C_PROVIDER_CLIENT_SECRET"
},
"openIdConnectConfiguration": {
"wellKnownOpenIdConfiguration": "https://<my specifics>/v2.0/.well-known/openid-configuration"
}
},
"login": {
"nameClaimType": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
"scopes": [],
"loginParameterNames": []
}
}
}
}
}
This function never get's called from what I can tell - have the api/get_roles function hard-coded to test with this:
default_roles = {
"roles": [
"anonymous",
"tester"
]
}
But when I output the client principal after login, I see the normal anonymous + authenticated.
I can't see any reason this would NOT work, unless manage roles with custom functions are not enabled for either:
- python
- AADB2C
Any help would be appreciated.