SOP: Restrict user consent to apps and turn on the admin consent workflow
Purpose
Section titled “Purpose”By default, any user can let an app read their own data, such as their mailbox, as long as the permission doesn’t need admin consent. Attackers use this. They send a link to a convincing app, the user clicks Accept, and the app keeps access even after a password reset.
This SOP does four things:
- Limits what users can consent to on their own.
- Defines which permissions count as low impact (only if you keep limited user consent).
- Gives users a request button so the business isn’t blocked, with named reviewers who decide.
- Reviews the grants that already exist, because a new setting doesn’t remove old consent.
Prerequisites
Section titled “Prerequisites”- Agree with security and the service desk which option you’ll use (see the table below) and who will review requests.
- Pick reviewers who already hold a role that can grant consent. Naming someone as a reviewer doesn’t give them extra rights.
- Microsoft Graph PowerShell (
Microsoft.Graph.Identity.SignInsmodule) for the scripted steps. - Tell users before the change. After it, some apps will show Approval required instead of a consent screen.
The three user consent options
Section titled “The three user consent options”The setting is in User consent for applications. The portal offers these built-in choices:
| Portal option | What users can do | Policy ID behind it |
|---|---|---|
| Do not allow user consent | Nothing new. They keep using apps that already have consent. Only admins can consent. | (none assigned) |
| Allow user consent for apps from verified publishers, for selected permissions | Consent only to apps from a verified publisher or registered in your tenant, and only to permissions you mark as low impact | microsoft-user-default-low |
| Allow user consent for apps | Consent to any permission that doesn’t need admin consent, for any app | microsoft-user-default-legacy |
Microsoft recommends the verified-publisher option at minimum. The strictest choice is Do not allow user consent. Either way, turn on the admin consent workflow so users have a way to ask.
Steps (portal)
Section titled “Steps (portal)”1. Review what is already consented (read-only).
- Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
- Go to Entra ID > Enterprise apps > All applications and open an app.
- Select Permissions. The Admin consent tab shows tenant-wide grants. The User consent tab shows grants made by individual users.
- Select a permission to open Permission Details. Note anything you don’t recognise. Don’t revoke yet; do that as a separate, approved change.
2. Set user consent.
- Sign in as a Global Administrator (required for this setting in the portal).
- Go to Entra ID > Enterprise apps > Consent and permissions > User consent settings. (Some Learn pages still show this as Identity > Applications > Enterprise apps.)
- Write down the current choice under User consent for applications. That is your rollback value.
- Choose Do not allow user consent or Allow user consent for apps from verified publishers, for selected permissions.
- Select Save.
3. Classify low-impact permissions (only if you chose the verified-publisher option).
- As at least a Cloud Application Administrator, go to Entra ID > Enterprise apps > Consent and permissions > Permission classifications.
- Open the Low tab and select Add permissions.
- Pick the API (for example Microsoft Graph) and the delegated permissions to allow. A safe start is the basic sign-in set:
openid,profile,email,offline_access.
Only delegated permissions that don’t need admin consent can be classified. If you classify nothing, users can’t consent to anything under this option.
4. Turn on the admin consent workflow.
- As a Global Administrator, go to Entra ID > Enterprise apps > Consent and permissions > Admin consent settings.
- Under Admin consent requests, set Users can request admin consent to apps they are unable to consent to to Yes.
- Fill in:
- Who can review admin consent requests: users, groups or roles.
- Selected users will receive email notifications for requests: keep on. If off, requesters don’t get emails either.
- Selected users will receive request expiration reminders: on.
- Consent request expires after (days): for example 7.
- Select Save. It can take up to an hour to start working.
5. Handle requests (reviewers).
- Go to Entra ID > Enterprise apps. Under Activity, select Admin consent requests.
- Open the My Pending tab. The All (Preview) tab is history only.
- Select the app. Check Review permissions and consent, App details and Requested by.
- Decide:
- Approve by granting admin consent. This opens the app to everyone in the tenant unless you require user assignment.
- Deny with a reason. Users can ask again later.
- Block with a reason. Users can’t request this app again. A disabled service principal is created in your tenant.
Only Global Administrators can approve requests for Microsoft Graph application permissions (app roles). Cloud Application Administrators and Application Administrators can approve the rest.
Steps (PowerShell / Graph)
Section titled “Steps (PowerShell / Graph)”1. Read the current state (read-only)
Section titled “1. Read the current state (read-only)”Connect-MgGraph -Scopes "Policy.Read.All","Directory.Read.All","Application.Read.All"
# Current user consent setting. Save this output: it is your rollback value.Get-MgPolicyAuthorizationPolicy | Select-Object -ExpandProperty DefaultUserRolePermissions | Select-Object -ExpandProperty PermissionGrantPoliciesAssigned
# Current admin consent workflowGet-MgPolicyAdminConsentRequestPolicy | Format-List
# Low-impact permission classifications on Microsoft Graph$graphSp = Get-MgServicePrincipal -Filter "displayName eq 'Microsoft Graph'"Get-MgServicePrincipalDelegatedPermissionClassification -ServicePrincipalId $graphSp.IdHow to read the first result:
- Contains
managePermissionGrantsForSelf.microsoft-user-default-legacy: users can consent to any app. - Contains
managePermissionGrantsForSelf.microsoft-user-default-low: verified publishers and low-impact permissions only. - No
managePermissionGrantsForSelf.*entry: user consent is off. - Any
managePermissionGrantsForOwnedResource.*entries: these cover owner consent for resources such as apps they own. Keep them in every update below.
2. List existing delegated grants (read-only)
Section titled “2. List existing delegated grants (read-only)”# Every delegated grant. ConsentType "Principal" = one user consented.# "AllPrincipals" = admin consented for the whole tenant.Get-MgOauth2PermissionGrant -All | Select-Object ClientId, ConsentType, PrincipalId, ResourceId, Scope | Export-Csv .\oauth2-grants.csv -NoTypeInformationClientId is the object ID of the app’s service principal, not its app ID. Look it up with Get-MgServicePrincipal -ServicePrincipalId <ClientId>. To see application permissions granted to one app, run Get-MgServicePrincipalAppRoleAssignment -ServicePrincipalId <id> -All.
Look hard at user grants (Principal) with broad scopes such as mail or file access, apps you don’t recognise, and apps with few users.
3. CHANGE: set user consent
Section titled “3. CHANGE: set user consent”Connect with write rights as a Privileged Role Administrator:
Connect-MgGraph -Scopes "Policy.ReadWrite.Authorization"Option A: Turn off user consent. List only the managePermissionGrantsForOwnedResource.* values you saved in step 1. If there were none, use an empty array @().
# CHANGE: users can no longer consent to apps$params = @{ defaultUserRolePermissions = @{ permissionGrantPoliciesAssigned = @( "managePermissionGrantsForOwnedResource.<value-you-saved>" ) }}Update-MgPolicyAuthorizationPolicy -BodyParameter $paramsOption B: Verified publishers, low-impact permissions only.
# CHANGE: limited user consent$params = @{ defaultUserRolePermissions = @{ permissionGrantPoliciesAssigned = @( "managePermissionGrantsForSelf.microsoft-user-default-low", "managePermissionGrantsForOwnedResource.<value-you-saved>" ) }}Update-MgPolicyAuthorizationPolicy -BodyParameter $params4. CHANGE: classify a permission as low impact (Option B only)
Section titled “4. CHANGE: classify a permission as low impact (Option B only)”Sign in as at least a Cloud Application Administrator.
Connect-MgGraph -Scopes "Policy.ReadWrite.PermissionGrant","Application.Read.All"
$graphSp = Get-MgServicePrincipal -Filter "displayName eq 'Microsoft Graph'"$perm = $graphSp.Oauth2PermissionScopes | Where-Object { $_.Value -eq "openid" }
# CHANGE: mark openid as low impactNew-MgServicePrincipalDelegatedPermissionClassification -ServicePrincipalId $graphSp.Id -BodyParameter @{ PermissionId = $perm.Id PermissionName = $perm.Value Classification = "Low"}Repeat for profile, email and offline_access, or any other permission you agreed on.
5. CHANGE: turn on the admin consent workflow
Section titled “5. CHANGE: turn on the admin consent workflow”Through Graph, Cloud Application Administrator or Application Administrator is enough. The update needs every required property, not just the one you change. Reviewers are given as Graph queries; replace the object IDs with your reviewers.
Connect-MgGraph -Scopes "Policy.ReadWrite.ConsentRequest"
# CHANGE: enable requests and set reviewers$params = @{ isEnabled = $true notifyReviewers = $true remindersEnabled = $true requestDurationInDays = 7 reviewers = @( @{ query = "/users/<reviewer-1-object-id>"; queryType = "MicrosoftGraph" }, @{ query = "/users/<reviewer-2-object-id>"; queryType = "MicrosoftGraph" } )}Update-MgPolicyAdminConsentRequestPolicy -BodyParameter $paramsVerify
Section titled “Verify”Connect-MgGraph -Scopes "Policy.Read.All"
# Expect no managePermissionGrantsForSelf.* (Option A)# or managePermissionGrantsForSelf.microsoft-user-default-low (Option B)(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions.PermissionGrantPoliciesAssigned
# Expect IsEnabled = True and your reviewers listedGet-MgPolicyAdminConsentRequestPolicy | Format-List IsEnabled, NotifyReviewers, RemindersEnabled, RequestDurationInDays, ReviewersThen test with a normal user (for example testuser@yourdomain.com):
- Wait up to an hour after enabling the workflow.
- Sign in to an app the user has never used that asks for more than the low-impact set.
- The user should see Approval required, enter a reason and select Request approval.
- A reviewer should get the email and see the request under Admin consent requests > My Pending.
Rollback
Section titled “Rollback”Use the values you saved in step 1.
- User consent (portal): Consent and permissions > User consent settings, pick the old option, Save.
- User consent (PowerShell): run
Update-MgPolicyAuthorizationPolicywithpermissionGrantPoliciesAssignedset to the exact list you saved. To restore the old default, that list includesmanagePermissionGrantsForSelf.microsoft-user-default-legacy. - Classification: remove it with
Remove-MgServicePrincipalDelegatedPermissionClassification -ServicePrincipalId $graphSp.Id -DelegatedPermissionClassificationId <id>. - Admin consent workflow (portal): Admin consent settings, set Users can request admin consent to apps they are unable to consent to to No, Save.
- Admin consent workflow (PowerShell): rerun step 5 with
isEnabled = $false, keeping the other required properties.
Rolling back doesn’t restore consent you revoked. Revoking and restoring grants is a separate procedure on Learn (Review permissions granted to enterprise applications).
- Save the current
PermissionGrantPoliciesAssignedvalue before any change. - Keep every
managePermissionGrantsForOwnedResource.*entry when you update the list. - Turn on the admin consent workflow at the same time you restrict consent, so users have a path.
- Use at least two reviewers who already hold a role that can grant the consent being asked for.
- Export existing grants to CSV and review them, then repeat on a schedule.
- Before approving, check the publisher, the permissions and who asked. If you can’t tell who controls the app, don’t approve.
Don’ts
Section titled “Don’ts”- Don’t assume the new setting removed old access. Existing grants stay until you revoke them.
- Don’t paste the policy examples without your own
managePermissionGrantsForOwnedResource.*values. You may switch off owner consent by accident. - Don’t use Deny for an app you never want. Use Block, or users can keep asking.
- Don’t approve a request just to clear the queue. Approval opens the app to the whole tenant unless you require user assignment.
- Don’t pick the verified-publisher option and skip classification. Users then can’t consent to anything and every app lands in the queue.
Common mistakes
Section titled “Common mistakes”- Testing straight away. The admin consent workflow can take up to an hour to switch on.
- Adding a new reviewer and expecting them to act on old requests. They only see requests created after they were added.
- Removing a reviewer and expecting their emails to stop. They keep reminders for requests made while they were a reviewer.
- Turning off reviewer email notifications. Requesters then get no emails either.
- Revoking a user’s consent and calling it done. The user can consent again unless the tenant setting stops it.
- Expecting a Cloud Application Administrator to approve Microsoft Graph application permissions. Those need a Global Administrator in the workflow, or a Privileged Role Administrator when granting consent directly.
Weekly · 5-minute read
The Identity Brief
Identity & Microsoft 365 changes that need action, one SOP, one script — every week. Verified against official Microsoft sources.
No spam. Unsubscribe anytime. Privacy