0
votes

My AD tenant has user consent disabled, i.e., all permissions added to AD app registration need an admin consent.
For an application using static permissions/scopes (v1.0 OAuth/OpenId endpoint), is it possible to add new permissions such that until the admin consent is granted, users can continue using features which require only the existing consented scopes?

Microsoft docs say: "The app needs to know all of the resources it would ever access ahead of time. It was difficult to create apps that could access an arbitrary number of resources." Does it mean that for my scenario, all users need to wait for admin consent before they can access the app?

I receive the below error when a user tries logging in to the app using the Open ID Connect flow. For reference, my login URL is similar to https://login.microsoftonline.com/{tenant}/oauth2/authorize?response_type=id_token&client_id=b8ad6a99-cd23-40a6-a1b4-1184af990aa2&redirect_uri=https%3A%2F%2Flocalhost%2F&state=13ccfb84-cfd1-4cb0-bfe3-bb2c227e19f7&client-request-id=4d76947a-0000-48af-aeff-7bc2d5e40000&x-client-SKU=Js&x-client-Ver=1.0.17&nonce=ef1caa16-d3fe-4523-a9c9-000000000000

Error screenshot link

AD app registration screenshot

2

2 Answers

0
votes

is it possible to add new permissions such that until the admin consent is granted, users can continue using features which require only the existing consented scopes?

Yes, you can. When the admin consent the API permission of an AD App(App registration), the permissions essentially will be given to the service principal(Enterprise application) in your AAD tenant. Actually if you use the AD App in your tenant, the permissions are essentially from the service principal.

You could refer to the screenshot below, there are four permissions, the two permission has been granted.

enter image description here

Navigate to the Overview, click the option Manage application in local directory.

enter image description here

Then in the Permissions, you will find the two permissions which have been consent.

enter image description here

0
votes

When you add the new scopes, the app will keep working, but it will only be able to access the old scopes until the admin consents to the new scopes.

Thanks! Alex Simons