Search code examples
azure-active-directoryazure-ad-b2cazure-ad-msal

AADB2C90205: Application does not have sufficient permissions against this web resource to perform the operation


I have created an Azure AD B2C application and tried to integrate it with React JS using the MSAL Library. When I try to get an access token, however, I am getting the following error:

AADB2C90205: This application does not have sufficient permissions against this web resource to perform the operation

How can I resolve this error?


Solution

  • The link provided by @Jas Suri is correct, but I need to add some more:

    You need to create two applications, one representing the client application and the other representing the api application, and then use the client application to call the api application.

    Next, you need to expose the api of the back-end application and record the scope name, then go to the client application to add the scope to the API permissions (you need to find it in My APIs), and grant the admin consent to the permission.

    enter image description here

    Finally, when you get the access token, you must add the scope.

    enter image description here

    enter image description here