microsoftgraph / microsoftgraph/msgraph-sdk-powershell

Update-MgDevice failed: Update-MgDevice_Update: Insufficient privileges to complete the operation.

Open
#3,297 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Service issue type:bug
Dominant language
C#
Stars
898
Forks
230
Avg merge
2d 5h
Merged PRs (30d)
31

Description

Describe the bug

I am trying to update existing device: vm-CL1-tstx
I want to add ExtensionAttributes using Update-MGDevice.
Commands:
$mydevice = get-mgdevice | Where-Object {$_.DisplayName -eq "vm-CL1-tstx"}
$param = @{'extensionAttributes' = @{'extensionAttribute1'='tiruriru'}}
update-mgdevice -deviceId $myDevice.Id -BodyParameter ($param | ConvertTo-Json -Depth 10)

I have following permissions:
Device.Read.All
Device.ReadWrite.All
Directory.AccessAsUser.All
Directory.ReadWrite.All
openid
Policy.Read.All
profile
User.Read
email

Expected behavior

command pass successfully.

How to reproduce

$mydevice = get-mgdevice | Where-Object {$_.DisplayName -eq "vm-CL1-tstx"}
$param = @{'extensionAttributes' = @{'extensionAttribute1'='tiruriru'}}
update-mgdevice -deviceId $myDevice.Id -BodyParameter ($param | ConvertTo-Json -Depth 10)

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported Update-MgDevice command and its extensionAttributes payload, then verify the listed Microsoft Graph permissions and the missing SDK version or debug output. Reproduce the insufficient-privileges response and determine whether the cause is permission configuration or SDK behavior; done means a verified explanation and an actionable resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api, authorization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.