/errors/microsoft-graph/insufficient-privileges-to-complete-the-operation
Microsoft Graph PowerShell: Insufficient privileges to complete the operation (Authorization_RequestDenied)
- tool
- Microsoft Graph PowerShell
- versions
- Microsoft.Graph 2.x
- os
- windows, linux, macos
Insufficient privileges to complete the operation. (error code Authorization_RequestDenied, HTTP 403) is returned by Microsoft Graph, not by PowerShell: the request reached Graph, but the token is not allowed to do what you asked. Two things must both allow the call:
- Permission in the token: the scope you requested with
Connect-MgGraph -Scopes(delegated) or the application permission granted to the app (app-only). - For delegated access, the user's own rights: the signed-in user needs an Entra role that allows the operation. A scope never gives a user more rights than they already have.
Check the token
Get-MgContext | Select-Object AuthType, Account, ClientId, @{n='Scopes'; e={$_.Scopes -join ', '}}Then look up what the cmdlet needs:
Find-MgGraphCommand -Command Update-MgUser |
Select-Object -First 1 -ExpandProperty Permissions |
Format-Table Name, PermissionType, IsAdminIf the scope is missing, reconnect with it:
Connect-MgGraph -Scopes "User.ReadWrite.All"The scope is there and it still fails
For delegated sessions the answer is usually the user's role. Typical examples:
| Operation | Needs (delegated) |
|---|---|
| Create, update or delete normal users | User.ReadWrite.All scope + User Administrator role (or higher) |
| Reset passwords of administrators | A role that can manage that administrator, for example Privileged Authentication Administrator |
| Manage group membership | Group.ReadWrite.All or GroupMember.ReadWrite.All scope + Groups Administrator role, or being a group owner |
| Assign licenses | User.ReadWrite.All or LicenseAssignment.ReadWrite.All scope + License Administrator or User Administrator role |
For app-only sessions (AuthType is AppOnly), the application permission must be granted with admin consent in the app registration (API permissions > Grant admin consent). Some operations, such as changing passwords or properties of privileged users, also need the app's service principal to hold an Entra role. Reconnect after any change: existing tokens keep the old permissions.
See Graph permission vs Entra role for how the two layers combine.
Sources
- learn.microsoft.comlearn.microsoft.com/en-us/graph/errors
- learn.microsoft.comlearn.microsoft.com/en-us/graph/permissions-overview
- learn.microsoft.comlearn.microsoft.com/en-us/powershell/microsoftgraph/find-mg-graph-command
- learn.microsoft.comlearn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference