msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

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

Open markoglogovac opened this issue 7 months ago • 0 comments

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_

markoglogovac avatar Apr 25 '25 13:04 markoglogovac