microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Update-MgUser Unable to Clear onPremisesImmutableId
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Describe the bug
The Update-MgUser cmdlet cannot clear the onPremisesImmutableId property.
To Reproduce
Execute a command such as:
Update-MgUser -UserId [UserId] -OnPremisesImmutableId $null
Expected behavior
The property should clear.
The payload generated by Update-MgUser is:
{"onPremisesImmutableId": ""}
It should be:
{"onPremisesImmutableId":null}
Module Version
2.11.1
Environment Data
Name Value
---- -----
PSVersion 5.1.20348.2110
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2110
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
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.
Research direction
Start with the Update-MgUser entry point and reproduce the command using -OnPremisesImmutableId $null. Trace the generated request payload and identify where the empty string is produced; done means the request sends a JSON null and the property can be cleared successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100