question

Rahul-7230 avatar image
0 Votes"
Rahul-7230 asked HighTechHick commented

how to update b2b user upn/mail ?

Hi Team,

Recently I'm facing an issue with some b2b users who's email and upn got changed in their home tenant/directory. Example aaa.bbb@xyz.com now changed to bbb.aaa@xyz.com

Now how do I correct the changes in our b2b tenant. We can't edit the upn/mail directly.

And also these are b2b users their upn is in different format something like this aaa.bbb_xyz.com#EXT#@b2b.com

How to fix this issue any advise here ? ( Don't want to send new invite on this changed id bbb.aaa@xyz.com )

azure-ad-b2b
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

FrankHuMSFT-3200 avatar image
0 Votes"
FrankHuMSFT-3200 answered

@Rahul-7230 unfortunately you'll need to send out invites to fix this issue.

If you'd like to see if a support agent can help you with changing the names on the backend please submit a support ticket per the docs here : https://docs.microsoft.com/en-us/azure/active-directory/b2b/get-support

However, I don't believe they'll be able to help you in this scenario.

If you're interested in submitting feedback to the product please put it here : https://feedback.azure.com/forums/169401-azure-active-directory and if there's enough communal support then the product team will look into putting this on the roadmap accordingly.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

amanpreetsingh-msft avatar image
4 Votes"
amanpreetsingh-msft answered HighTechHick commented

@Rahul-7230 Although there are ways (as mentioned below) to change UPN and Email address but that might not help you in this scenario and as Frank mentioned, you'll need to send out invites to fix this issue.

Workaround: If possible, instead of changing the email address, suggestion would be to add bbb.aaa@xyz.com as alias to aaa.bbb@xyz.com to avoid this situation.

To change UPN, User name and MailNickname:

  1. Connect-AzureAD
  2. Get-AzureADUser -ObjectId <ObjectID of the User> | fl 
  3. Set-AzureADUser -ObjectId <ObjectID of the User> -UserPrincipalName bbb.aaa_xyz.com#EXT#@b2b.com 
  4. Set-AzureADUser -ObjectId <ObjectID of the User> -MailNickName bbb.aaa_xyz.com#EXT#

To change Email address, you would need to use Exchange Online PowerShell Module. This can't be done by using Azure AD Module or Graph API.

  1. Install-Module -Name ExchangeOnlineManagement Connect-ExchangeOnline 
  2. Set-MailUser -Identity bbb.aaa_xyz.com#EXT# -PrimarySmtpAddress bbb.aaa@xyz.com


Please "Accept as answer" wherever the information provided helps you to help others in the community.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your responses @amanpreetsingh-msft @FrankHuMSFT-3200 I guess I have to send the invite again on new id.


Correcting the upn and mail will not work.


0 Votes 0 ·

@Rahul-7230 Yes, that is correct.

0 Votes 0 ·

@Rahul-7230 , Hope you are good . I understand you got clarity about the question hence I would request you to accept the posts as answer whichever had helpful information . It will help the community in general by improving the relevancy of the thread for anyone searching for similar query.

0 Votes 0 ·

@amanpreetsingh-msft thank you for this info!
We have an outside company that had changed their domain name. we were able to use this to update their UPN's accordingly.


0 Votes 0 ·