Skip to content

Azure-AD provider login dialog does not ask user for extra permissions? #11504

Answered by oscarcoding
oscarcoding asked this question in Help
Discussion options

You must be logged in to vote

I did end up accidentally find the answer to this - in the authOptions scope section, you have to also include prompt: consent. I didn't see that in any documentation, but there is so much I may have missed it.

export const authOptions = {
  adapter: PrismaAdapter(prisma),
  providers: [
    AzureADProvider({
      clientId: ...,
      clientSecret: ...,
      tenantId: ...,

      authorization: {
        params: {
          scope: 'openid email profile Sites.Search.All ... etc ... ',
          prompt: 'consent', // HERE !
        },
      },
    }),
  ],

Still getting a 403, but at least it now asks the user to give access to the delegated permission. So thats progress at least.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by oscarcoding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant