unable to rename smtp address having onmicrosoft.com

Glenn Maxwell 10,146 Reputation points
2020-12-30T19:10:29.737+00:00

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@Company portal .com, i have renamed it to sharedmailbox@Company portal .com in onprem, but in cloud
still i am still seeing secondary smtp address as sharedmailbox01@Company portal .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

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
586 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,190 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,356 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
1,895 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 142.2K Reputation points MVP
    2020-12-31T13:14:52.107+00:00

    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://learn.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://learn.microsoft.com/en-us/powershell/module/msonline/connect-msolservice?view=azureadps-1.0

    https://learn.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.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. KyleXu-MSFT 26,211 Reputation points
    2020-12-31T05:30:44.307+00:00

    @Glenn Maxwell

    It is an expected behavior for a migrated mailbox, you cannot remove the default email address(@keyman .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.

    1 person found this answer helpful.
    0 comments No comments