Jump to content
Sign in to follow this  
  • entries
    141
  • comments
    0
  • views
    78764

How to disconnect a mailbox & re-assign it to new user in a Hybrid Scenario

Sign in to follow this  
proximagr

436 views

How to disconnect a mailbox & re-assign it to new user in a Hybrid Scenario
Scenario objectives: We have an Exchange Hybrid setup between on-premises and Exchange Online (Office 365). All users are synced and the mailbox is located at Exchange Online.
We need to separate an existing mailbox from its user account and re-connect this mailbox to a new user account. If the mailbox in this scenario was located at the on-premises Exchange it would be an easy process just using the Exchange Management Console. But in a Hybrid scenario, the process includes many steps since the mailbox is not directory conencted to the Active Directory user account but it is conected to the Azure AD Synced User Account.
For the ease of the guide we will name the Existing User Account: OLDUSER and the New User Account: NEWUSER.
We will disconnect the Exchange Online Mailbox from the OLDUSER and connect it to the NEWUSER.
Step 1.
At the on-premises Active Directory, at an OU that is not synced with Azure AD, create the new user account. The “NEWUSER”. Ensure that you do not enter nothing at the email field. Just a user account with no email attributes.
Step 2.
Move the “OLDUSER” to an OU that is not synced with Azure AD
Step 3.
Run a Delta Sync. Go to the server that the AD Connect is installed, open the PowerShell and run “Start-ADSyncSyncCycle”
Step 4.
We need to get the GUID of the NEWUSER. To do so login to a Domain Controller, open PowerShell and run:

 



1



[system.convert]::ToBase64String((Get-Aduser NEWUSER).objectGUid.ToByteArray())

 

img_594a4492c7b43.png
Copy the GUID to a Notepad
Step 5.
Open the Office 365 Admin Center and Restore the deleted user “OLDUSER”
Go to Users –> Deleted Users –> Select the user “OLDUSER” –>Click Restore
img_594a456ca9d87.png
Step 6.
Connect to Azure AD and set the GUID of the “NEWUSER” to the Office 365 “OLD USER”. Details for connecting to Azure AD “https://technet.microsoft.com/en-us/library/dn975125.aspx

 



1


2


3



Connect-MsolService

Set-MsolUser -UserPrincipalName olduser@mydomain.com -ImmutableId vMZGJpW6CUGY09bduJ5dlw==

 

img_594a46a11e745.png
Step 5.
Open the Office 365 Admin Center and Delete the old user “OLDUSER”
Go to Users –> Active users –> Select the “OLDUSER” –> click Delete user
img_594a46e3db163.png
Step 6.
Clean the on-premises Active Directory account of the old user “OLDUSER” from all attributes that will be added to the new user, like Proxy addresses, Target, address, Alias name, nickname etc.
Step 7.
Make the “NEWUSER” user account a Remote Mailbox object
At the on-premises Exchange, open the Exchange Management Shell and run:

 



1



Enable-RemoteMailbox -Identity NEWUSER -DisplayName "NEW USER" -RemoteRoutingAddress newuser@mydomain.onmicrosoft.com -Alias newuser -PrimarySmtpAddressnewuser@mydomain.com

 

Step 8.
Move the “NEWUSER” to an OU that is Synced with Azure AD and run a Delta Sync like Step 3.
After that the “NEWUSER” active directory account will be connected with the “OLDUSER” Exchange Online mailbox and all attributes of the Exchange Online mailbox will be replaced with the “NEWUSER’s” values.

 

I suppose there are other ways, maybe easier, to accomplish this task, but following this process you will have the desired result without problems.

 


[/url]
EmailPrint

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...