Open SethvdAxe opened 10 months ago
I personally encountered the 401 response when using https://login.microsoftonline.com/organizations/v2.0
. Swapping organizations
out for an explicit tenant guid worked. This didn't solve my issue because I need users from different tenants to be able to sign in. So I tried common
instead, which works without producing a 401 callback response.
According to https://learn.microsoft.com/en-us/entra/identity-platform/howto-convert-app-to-be-multi-tenant#update-your-code-to-handle-multiple-issuer-values and https://learn.microsoft.com/en-us/entra/identity-platform/access-tokens#multi-tenant-applications it seems SWA should use special validation logic in case of multitenant. If common
works, and organizations
does not, may be they didn't implement organizations
endpoint support.
Describe the bug
We get a 401 unauthorised page after successfully(?) logging in with an account of an external tenant in our web app. We get it on the “/.auth/login/aad/callback” redirect. It does correctly work with ourselves as a tenant.
To Reproduce Steps to reproduce the behavior (see below for set-up that works):
Expected behavior
Screenshots
Device info (if applicable):
Additional context Replicating the problem for our organisation (our own tenant and application id): We are able to replicate the problem in our organisation when in the static web app configuration we intentionally set a wrong AZURE_CLIENT_SECRET secret value. This had led us to double check and reset the secret value with the external organization but this did not help.