azureazure-active-directory

Azure Remove User Consent to API


From my frontend application, when I request an access token I pass two scopes that need to be returned with the token.

I did not grant the application these consent in the Azure Portal. Instead the user has to explicitely give consent from the popup window.

Once the user has granted consent, I get the access token with the required scopes.

But how do I revoke consent from the Azure Portal ? And how can I see which user has granted consent ?


Solution

  • You can go to Enterprise Applications -> Find your app -> Permissions tab -> User consent tab.

    There you can see which permissions users have consented to, for example:

    Permissions tab

    You can then click Review permissions -> This app has more permissions than I want. This will give you a PowerShell script that you can run to remove all user consent for that app. It can of course be customized to only remove certain permissions.

    Currently there is no UI features to remove consented permissions, PowerShell/Graph API is the only way.