Closed rhufsky closed 2 weeks ago
I also had trouble following the documentation and migrating to the new Microsoft Entra ID provider, thinking that the 'issuer' parameter was the 'tenantId', which caused the following error:
[auth][error] TypeError: Invalid URL
'issuer' seems instead to be an URL in the following format: https://login.microsoftonline.com/[tenantID]/v2.0
So finally what I did was changing my .env.local file and adding the following entry which seems to work:
# the issuer URL
AUTH_MICROSOFT_ENTRA_ID_ISSUER="https://login.microsoftonline.com/$AUTH_MICROSOFT_ENTRA_ID_TENANT_ID/v2.0"
Maybe could the docs be more specific about this parameter?
You are right, this works, see also https://github.com/nextauthjs/next-auth/issues/12195
What is the improvement or update you wish to see?
The docs recommend this config
Change
issuer
totenantId
.Is there any context that might help us understand?
The docs recommend this config
internally
issuer
seems to be an URL. When providing tenant id here, the provider raises an exception while attempting to create an URL object out of the tenant id.Does the docs page already exist? Please link to it.
https://authjs.dev/reference/core/providers/microsoft-entra-id