Forum Discussion
pischta
May 22, 2025Copper Contributor
OnPremisesImmutableId field update
Hi, when I update the OnPremisesImmutableId with Update-MgUser -UserId "<user id>" -OnPremisesImmutableId '<base64 coded id>' if it contains '/', that character doesn't stored. Other "interesti...
- May 23, 2025
I don't seem to have issues with that, which version of the module are you on? Make sure you enclose the value in quotes.
For the second query, that's the expected behavior, as Get-MgUser only returns a limited set of properties by default, and OnPremisesImmutableId is not one of them. You have to specifically request it.
pischta
May 26, 2025Copper Contributor
Module version is 2.26.0. I used quotes, of course.
I upgraded to 2.28.0, and the update of the OnPremisesImmutableId works well now, thanks.
I queried the users with
Get-MgUser -UserId "<UPN>" | Select-Object UserPrincipalName, OnPremisesImmutableId
VasilMichev
May 28, 2025MVP
Ah yes, 2.26.0/2.27.0 had some very nasty bugs... this module as a whole is terrible to a point where I prefer to make the direct Graph calls instead.