msgraph-sdk-powershell
msgraph-sdk-powershell copied to clipboard
Update-MgDevice failed: Update-MgDevice_Update: Insufficient privileges to complete the operation.
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_