Skip to content

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

@markoglogovac

Description

@markoglogovac

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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions