--- title: "Troubleshoot Admin Consent Failures for Delegated Graph API Permissions" slug: "dex-wf-troubleshoot-admin-consent-delegated-graph" updated: 2026-11-30T16:15:32Z published: 2026-11-30T16:15:32Z canonical: "documentation.sysaid.com/dex-wf-troubleshoot-admin-consent-delegated-graph" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.sysaid.com/llms.txt > Use this file to discover all available pages before exploring further. # Troubleshoot Admin Consent Failures for Delegated Graph API Permissions Diagnose why users with the User Administrator role cannot grant admin consent, and assign the correct least-privilege role to enable consent for delegated Graph API scopes such as `User.Read.All`. **Complexity:** Intermediate. **Impact:** security + access-management + least-privilege + troubleshooting. ## Why use this workflow A common source of confusion in Microsoft Entra ID is a user with the **User Administrator** role who tries to grant admin consent for a Graph API permission (such as `User.Read.All`) and is blocked with a consent error. Many admins assume that because User Administrator can manage users and groups, it also covers application consent. It does not. Admin consent is controlled by a separate set of roles, including **Global Administrator**, **Privileged Role Administrator**, **Cloud Application Administrator**, and **Application Administrator**. If a user holds only User Administrator, they fail to consent for any Graph scope that requires admin approval. Run this workflow when: - A delegated admin reports that they cannot approve consent prompts for internal tools, Power Platform connectors, or custom apps - You need to enable a user who is not a Global Administrator to grant consent on behalf of the tenant - You want to verify your tenant's consent policy and identify which roles are assignable - You are rolling out least-privilege admin delegation and need to separate user management from app management ## Expected outcomes - A diagnosis of why a given user cannot grant admin consent (role gap, tenant consent policy restriction, or missing service principal) - The correct least-privilege role assigned to the affected user, typically **Cloud Application Administrator**, so that they can grant consent without becoming a Global Administrator - A verified view of the tenant's authorization policy and permission grant policies - A repeatable approach to audit and remediate similar cases across several users - Documentation of the role assignment for audit and compliance evidence ## Risks and considerations ### Security and compliance considerations - **Cloud Application Administrator is a privileged role.** It can grant consent for a broad set of permissions. Review Microsoft's documentation for the exact limits of the role. Treat holders as Tier 1 admins and enforce MFA, Conditional Access, and PIM where possible. - **Do not default to Global Administrator.** Granting Global Administrator only to enable consent violates least privilege. Prefer Cloud Application Administrator or Application Administrator. - **The admin consent workflow is a safer alternative** for large tenants. Leave regular users with User Administrator and route consent requests to a reviewer queue instead of granting them consent rights directly. - **The tenant consent policy can still block the action** after the role assignment. If `ManagePermissionGrantsForSelf.*` policies are restrictive, or if the app is flagged as risky, consent still fails. Verify the permission grant policy as well. - **Do not confuse delegated and application permissions.** `User.Read.All` as a *delegated* permission requires admin consent because it reads across the directory. The fix is role-based, but the symptom looks identical to an app permission consent failure. - Log all role assignments in your change management system. The Entra audit logs retain them, but correlation with tickets speeds up incident review. ## Required permissions | Permission | Why it's needed | | --- | --- | | RoleManagement.ReadWrite.Directory | Required to read role definitions and assign directory roles such as Cloud Application Administrator. | | Directory.Read.All | Required to look up the target user and verify their current role memberships. | | Policy.Read.All | Required to inspect the tenant authorizationPolicy and permissionGrantPolicies to rule out tenant-level blocks. | | Application.Read.All | Required to enumerate service principals and confirm that the target app is registered in the tenant. | ## Ask Dex Paste the prompt into a Dex conversation. ### Prompt for IT admins ``` {user} has the User Administrator role but cannot grant admin consent for Graph permissions like User.Read.All. Investigate why, and if the issue is a role gap, assign the least-privilege role that allows them to consent (Cloud Application Administrator). Verify the fix. ``` ### How an end user can ask Dex ``` When I try to approve a permission request for our internal app, the Approve button is greyed out or I get an error saying admin approval is required. Can you fix my account so I can consent? ``` ## Manual steps (admin center) ### Step 1: Confirm the symptom 1. Have the affected user attempt to consent again, and capture the exact error message and correlation ID. 2. Typical errors: *AADSTS65001: The user or administrator has not consented to use the application*, or *Need admin approval* with no approve button visible. ### Step 2: Verify the user's current roles 1. Go to the [Microsoft Entra admin center](https://entra.microsoft.com) > **Identity** > **Users** > **All users**. 2. Search for the affected user (for example, `{user_upn}`) and open their profile. 3. Select **Assigned roles** in the left menu. 4. If only **User Administrator** is listed, that is the root cause. User Administrator cannot grant application consent. ### Step 3: Check tenant consent settings 1. Go to **Identity** > **Applications** > **Enterprise applications** > **Consent and permissions** > **User consent settings**. 2. Confirm which users are allowed to consent, and for which permission classifications. 3. Go to **Consent and permissions** > **Admin consent settings** and note whether the admin consent workflow is enabled. ### Step 4: Assign Cloud Application Administrator 1. Go back to the user's **Assigned roles** page. 2. Select **Add assignments**. 3. Search for and select **Cloud Application Administrator**. 4. Choose the assignment type (Active, or Eligible if you use PIM) and the scope (typically Directory). 5. Provide a justification and select **Assign**. ### Step 5: Validate 1. Have the user sign out and sign back in to refresh their token. 2. Retry the consent flow. The *Consent on behalf of your organization* checkbox should now be available. 3. Confirm that the grant appears under **Enterprise applications** > the app > **Permissions**. ## Microsoft Graph API ### 1. Resolve the user and list current roles ``` GET https://graph.microsoft.com/v1.0/users/{user_upn}?$select=id,displayName,userPrincipalName,accountEnabled ``` ``` GET https://graph.microsoft.com/v1.0/users/{user_upn}/memberOf/microsoft.graph.directoryRole?$select=id,displayName ``` If the response contains only `User Administrator`, the user lacks consent-granting permissions. ### 2. Inspect the tenant authorization policy ``` GET https://graph.microsoft.com/v1.0/policies/authorizationPolicy ``` Review `defaultUserRolePermissions.permissionGrantPoliciesAssigned`. Restrictive policies (for example, removing `microsoft-user-default-allow-consent-apps`) can compound the issue. ### 3. Look up the Cloud Application Administrator role The role template ID for Cloud Application Administrator is fixed: `158c047a-c907-4556-b7ef-446551a6b5f7`. If the role is not yet activated in the tenant, activate it: ``` POST https://graph.microsoft.com/v1.0/directoryRoles Content-Type: application/json {  "roleTemplateId": "158c047a-c907-4556-b7ef-446551a6b5f7" } ``` ### 4. Assign the role using unified role management ``` POST https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments Content-Type: application/json {  "principalId": "{user_object_id}",  "roleDefinitionId": "158c047a-c907-4556-b7ef-446551a6b5f7",  "directoryScopeId": "/" } ``` Successful response: `201 Created` with the new assignment object. ### 5. Verify ``` GET https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments?$filter=principalId eq '{user_object_id}' ``` The new assignment should be listed. Have the user re-authenticate to pick up the updated claims. ## PowerShell Use the Microsoft Graph PowerShell SDK to look up the target user, list their current roles, detect the User-Administrator-only pattern, assign Cloud Application Administrator when you choose to remediate, and verify the result. ### Prerequisites - `Install-Module Microsoft.Graph -Scope CurrentUser` - Sign in as a Global Administrator or Privileged Role Administrator: ``` Connect-MgGraph -Scopes "RoleManagement.ReadWrite.Directory","Directory.Read.All","Policy.Read.All" ``` ### Approach 1. Look up the target user and list their current directory roles. 2. Detect whether the user holds only User Administrator. 3. Run in read-only mode first and review the diagnosis. 4. Only when you choose to remediate, check that the user does not already hold Cloud Application Administrator, then create the assignment. Checking first makes the script safe to re-run and avoids duplicate assignments. 5. Verify the result by listing the user's role assignments.