Forum Discussion
Konstantinos N. Chionas
Jul 04, 2023Copper Contributor
MS Graph and AzureADUserExtension
Migration from Azure AD to MS Graph documentation, maps Set-AzureADUserExtension to Update-MgUserExtension. I used to use the following command to set user's ExtensionAttribute: Set-AzureADU...
- Jul 04, 2023Update-MgUserExtension is not what you need here, just Update-MgUser:
$Attributes = @{
"onPremisesExtensionAttributes" = @{
"extensionAttribute1" = "bla"
"extensionAttribute2" = "bla"
} | ConvertTo-Json
Update-MgUser -UserId blabla -BodyParameter $Attributes
PeteV
Apr 01, 2025Copper Contributor
Hi VasilMichev. Wondering how does this work for a custom extension name ?
For example my extension name is "extension_3381" with a value of 'x49'. Would I then use the following ?
$Attributes = @{
"onPremisesExtensionAttributes" = @{
"extension_3381" = "x49"
} | ConvertTo-Json