DEV Community

Discussion on: How to Configure Azure AD B2C Authentication with Next.js

Collapse
 
benjaminwfox profile image
Ben Fox • Edited

Hey Shiva, not sure if you've been able to get this working since your comment, but I've added in support for access_token recently. I did it following this Azure AD B2C documentation - the overview of which is that you have to add a Web API (in addition to the Web App), and then request that Web API as a claim in your scope: docs.microsoft.com/en-us/azure/act...

so then in my NextAuth provider, the scope looks like:

scope: 'https://${tenantName}.onmicrosoft.com/api/${apiAccessClaim} offline_access openid',

where (from the linked doc) tenantName is your-tenant-name and apiAccessClaim is demo.read