Hi Hames,
I have followed similar articles and the first part of method 1 works and i can change the UPN to he .onmicrosoft address but am faced with the following when trying to change the UPN to a @Stuff address in the second command.
"set-AzureADUser : Error occurred while executing SetUser
Code: Request_BadRequest
Message: The domain portion of the userPrincipalName property is invalid. You must use one of the verified domain
names in your organization.
RequestId: 160e3284-933b-4803-a9c9-b7a3792219a2
DateTimeStamp: Tue, 21 Sep 2021 06:35:37 GMT
Details: PropertyName - userPrincipalName, PropertyErrorCode - InvalidValue
HttpStatusCode: BadRequest
HttpStatusDescription: Bad Request
HttpResponseStatus: Completed
At line:1 char:1
- set-AzureADUser -ObjectId ******************** -UserPrincipalName *********@Stuff .com
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [Set-AzureADUser], ApiException
- FullyQualifiedErrorId : Microsoft.Open.AzureAD16.Client.ApiException,Microsoft.Open.AzureAD16.PowerShell.SetUser