microsoftgraph / microsoftgraph/msgraph-sdk-powershell

Update-MgDeviceManagementManagedDevice not working

Open
#2,551 7 comments 3 reactions 1 assignee View on GitHub

@Ndiritu is already working on this.

Since Jan 23, 2025.

Status: Needs Investigation
Dominant language
C#
Stars
898
Forks
230
Avg merge
2d 5h
Merged PRs (30d)
31

Description

Describe the bug
If I want to update a primary user of a device using the Update-MgDeviceManagementManagedDevice command, I get an error message stating the property 'businessPhones' does not exist on type 'microsoft.management.services.api.user'.

To Reproduce
Input:
$user = Get-MgUser -UserId "00000"
Update-MgDeviceManagementManagedDevice -ManagedDeviceId "00000" -Users $user

Output:
The property 'businessPhones' does not exist on type 'microsoft.management.services.api.user'. Make sure to only use property names that are defined by the type. Status: 400 (BadRequest)

Expected behaviour
The primary user should be successfully changed.

Module Version
Newest, currently aviable version.

Additional context
I already created a Service request with the API owner as required in Issue 1675, and they told me that it is on your side to fix the PowerShell SDK. On the API side everything is working fine. Please don't close the issue again!
There is also an answer by another Microsoft employee related to this issue: https://learn.microsoft.com/en-us/answers/questions/1506439/changing-primary-user-of-a-device-in-intune

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.