microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Update-MgDeviceManagementManagedDevice not working
@Ndiritu is already working on this.
Since Jan 23, 2025.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.