question

GlennMaxwell-2309 avatar image
0 Votes"
GlennMaxwell-2309 asked AndyDavid edited

unable to rename smtp address having onmicrosoft.com

Hi All

I am using exchange 2010 hybrid environment, we create regular mailboxes and shared mailboxes in onprem and migrate them to cloud.
i have a shared mailbox with name sharedmailbox01@contoso.com, i have renamed it to sharedmailbox@contoso.com in onprem, but in cloud
still i am still seeing secondary smtp address as sharedmailbox01@contoso.onmicrosoft.com how do i delete this smtp address.
When i try to delete it from office365 exchange admin center i am getting the below error.

52286-e.jpg


office-exchange-server-administrationoffice-exchange-online-itprooffice-exchange-hybrid-itprooffice-online-server-generaloffice-online-server-exchange
e.jpg (24.7 KiB)
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.

AndyDavid avatar image
0 Votes"
AndyDavid answered AndyDavid edited

If you offboard the shared mailbox back to on-prem, then remove the Azure object and resync with AADConnect, that would work and clean that up.
This assumes its not licensed and not using OneDrive etc...

https://docs.microsoft.com/en-us/exchange/hybrid-deployment/move-mailboxes#move-exchange-online-mailboxes-to-the-on-premises-organization

Once the mailbox is moved on-prem, run this using connect-msolservice against the Azure sycned object to remove it

https://docs.microsoft.com/en-us/powershell/module/msonline/connect-msolservice?view=azureadps-1.0

https://docs.microsoft.com/en-us/powershell/module/msonline/remove-msoluser?view=azureadps-1.0

 Remove-MsolUser -UserPrincipalName "sharedmailbox@contoso.com"

Followed by:

 Remove-MsolUser -UserPrincipalName "sharedmailbox@contoso.com" -RemoveFromRecycleBin


Then Resync the object from on-prem and move the mailbox back to 365.


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.

KyleXu-MSFT avatar image
0 Votes"
KyleXu-MSFT answered

@GlennMaxwell-2309

It is an expected behavior for a migrated mailbox, you cannot remove the default email address(@domain.onmicrosoft.com) from migrated mailbox.

You cannot see this email address with the command below, so you cannot remove it:

 Get-RemoteMailbox Shared | fl EmailAddresses

If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

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.