wise.potato
wise.potato

Reputation: 210

Restore "Access the user's profile" API Access

I deleted the "Access the user's profile" (which has access to "openid" and "offline_access" permissions) under API access in my Azure AD B2C application, and now I can't find a way to restore it. I cannot delete the app and create a new one.

Microsoft's documentation specifies that they are granted by default and can be removed but they don't mention how to restore them:

By default, applications are granted the ability to access the user's profile via the "openid” permission, and generate refresh tokens via the "offline_access" permission. These can be removed if you do not want your client application to have this functionality.

Screenshot showing the row that I deleted

How can I restore this?

Upvotes: 1

Views: 171

Answers (2)

wise.potato
wise.potato

Reputation: 210

As mentioned in this github issue, there is no way to recover those scopes currently, you have to file a support ticket so that Microsoft restores them manually.

Upvotes: 0

Vinod Patil
Vinod Patil

Reputation: 21

I struggled alot with this. Unfortunately Microsoft Azure has a bug.

But there is a workaround for this that I found after two days of effort:

  1. Go to App registration
  2. Select your application
  3. Go to Authentication -> Redirect URI
  4. Add new URL (eg. http://localhost:8000)

This will re-instate "Access the user's profile" in API Access in Azure AD B2C.

Now you can select below scopes;

  • Acquire an id_token for users(openid)
  • Acquire a refresh_token for users(offline_access)

and this will add "Access the user's profile" in API Access window.

Hope this will help you. There is no need of deleting existing app.

Upvotes: 2

Related Questions