you can modify your command like the following
Set-MsolUser -UserPrincipalName xxxxxxxx -MobilePhone $null
The command you used tried to set the MobilePhone attribute to a hashtable instead of null or an empty string which is causing the issue
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello All,
I have used the below command to remove the user phone number from Azure AD, using PowerShell,
set-MSOLUser -UserPrincipalName xxxxxxxx -MobilePhone @{ REMOVE = "xxxxxxxxxx" }
as the mobile number was still visible on Azure AD even after removing it at the AD level.
However, after this command now under the Mobile attribute I can see System.Collections.Hashtable instead of the Phone number and Null.
Can someone guide/assist in getting rid of this? Just want to set the mobile attribute to null.
Thank you
you can modify your command like the following
Set-MsolUser -UserPrincipalName xxxxxxxx -MobilePhone $null
The command you used tried to set the MobilePhone attribute to a hashtable instead of null or an empty string which is causing the issue