anonymous user
Thank you for your post!
Based off your issue, I found another thread with a similar ask - How to change domain name embedded in guest UPNs?
Change User's UPN:
Connect-MsolService
Set-MsolUserPrincipalName -UserPrincipalName "prefix#EXT#@domain.onmicrosoft.com" -NewUserPrincipalName "prefix@domain.com"
Note - You have to use a domain that's verified within your Azure AD when running Set-MsolUserPrincipalName. Otherwise, you'll receive the error message below.
If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.
----------
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.