Azure / Azure/static-web-apps

AAD authentication not authenticating - Azure Static Web App

Open
#1,099 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

We're using custom authentication and roles to limit access to certain users within the tenant. I have 'assignment required' set to yes in the enterprise application, and have added myself as a contributor in the app and also added myself with the 'default role' in the enterprise users and groups.

The issue is that after authenticating, it returns a 401. Any insights as to why authentication is failing?

The staticwebapp.config.json is below (my has been removed for this thread).

{
"routes": [
{
"route": "/*",
"allowedRoles": [
"authenticated"
]
}
],
"auth": {
"identityProviders": {
"azureActiveDirectory": {
"registration": {
"openIdIssuer": "https://login.microsoftonline.com//v2.0",
"clientIdSettingName": "AZURE_CLIENT_ID",
"clientSecretSettingName": "AZURE_CLIENT_SECRET"
}
}
}
},
"responseOverrides": {
"401": {
"redirect": "/.auth/login/aad?post_login_redirect_uri=.referrer",
"statusCode": 302
}
}
}

thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.