Application does not have sufficient permissions against this web resource to perform the operation in Azure AD B2C

Viewed 4368

I have created Azure AD B2C Application and tried to integrate with React JS using MSAL Library , When i tried to get access token I am getting following error.

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

Any Help would highly appreciated.

2 Answers

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

Related