Security is hard. Especially every vendor says they follow the standard of oAuth and implement differently. Let us look at the Azure App registration's API permissions blade.
<image permissions blade>
We can see there are 3 columns that may confuse us. One is the Type and 2 at last that denote whether the permission requires admin consent and the status column showing whether admin consent is granted or not.
Further, it reveals something very interesting. The 'User.Read' permission doesn't require admin consent but it's given. Why in the world someone needs to do like this?
Let us try to unmask the mystery or just read the docs.
Delegated permission v/s application permission types
Column 'Admin consent required'
What if admin consent is not required and it's not given and used by the user app
When an application demands permission that doesn't require admin consent and is used by an interactive user application, there will be a consent form that pops up that asks the user to give consent.
In short
The user has to give his consent even if the admin consent is not required.
What if admin consent is not required and it's not given and used by the daemon app
Admin consent is always required for the daemon apps to work with application permissions.
This completes the answer to the title question. Yes we need admin consent for the daemon applications even if "Admin consent required" is "No"
What if admin consent is not required but given and used by the user app
Special cases
ROPC Flow
Whatever the case the ROPC is not recommended by MSFT
Restrict users from consenting
ReadTheDocs
https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/configure-admin-consent-workflow
https://docs.microsoft.com/en-us/azure/active-directory/manage-apps/grant-admin-consent
No comments:
Post a Comment