Jump to content













Photo
- - - - -

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

  Posted by Pantelis Apostolidis , 21 June 2017 · 20 views

<h1 style="text-align: justify;">How to disconnect a mailbox &amp; re-assign it to new user in a Hybrid Scenario</h1>
<p style="text-align: justify;">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.</p>
<p style="text-align: justify;">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.</p>
<p style="text-align: justify;">For the ease of the guide we will name the Existing User Account: OLDUSER and the New User Account: NEWUSER.</p>
<p style="text-align: justify;">We will disconnect the Exchange Online Mailbox from the OLDUSER and connect it to the NEWUSER.</p>
<p style="text-align: justify;">Step 1.</p>
<p style="text-align: justify;">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.</p>
<p style="text-align: justify;">Step 2.</p>
<p style="text-align: justify;">Move the “OLDUSER” to an OU that is not synced with Azure AD</p>
<p style="text-align: justify;">Step 3.</p>
<p style="text-align: justify;">Run a Delta Sync. Go to the server that the AD Connect is installed, open the PowerShell and run “Start-ADSyncSyncCycle”</p>
<p style="text-align: justify;">Step 4.</p>
<p style="text-align: justify;">We need to get the GUID of the NEWUSER. To do so login to a Domain Controller, open PowerShell and run:</p>
<p></p><pre class="crayon-plain-tag">[system.convert]::ToBase64String((Get-Aduser NEWUSER).objectGUid.ToByteArray())</pre><p></p>
<p id="jmbPsYf" style="text-align: justify;"><img class="alignnone size-full wp-image-1301 " src="http://www.e-apostol...a4492c7b43.png"alt="" srcset="http://www.e-apostolidis.gr/wp-content/uploads/2017/06/img_594a4492c7b43.png 571w, http://www.e-apostol...7b43-300x21.png 300w" sizes="(max-width: 571px) 100vw, 571px" /></p>
<p style="text-align: justify;">Copy the GUID to a Notepad</p>
<p style="text-align: justify;">Step 5.</p>
<p style="text-align: justify;">Open the Office 365 Admin Center and Restore the deleted user “OLDUSER”</p>
<p style="text-align: justify;">Go to Users –&gt; Deleted Users –&gt; Select the user “OLDUSER” –&gt;Click Restore</p>
<p id="cPpLMLX" style="text-align: justify;"><img class="alignnone size-full wp-image-1302 " src="http://www.e-apostol...a456ca9d87.png"alt="" srcset="http://www.e-apostolidis.gr/wp-content/uploads/2017/06/img_594a456ca9d87.png 613w, http://www.e-apostol...d87-300x124.png 300w, http://www.e-apostol...d87-600x249.png 600w" sizes="(max-width: 613px) 100vw, 613px" /></p>
<p style="text-align: justify;">Step 6.</p>
<p style="text-align: justify;">Connect to Azure AD and set the GUID of the “NEWUSER” to the Office 365 “OLD USER”. Details for connecting to Azure AD “<a href="https://technet.micr...5.aspx</a>“</p>
<p></p><pre class="crayon-plain-tag">Connect-MsolService

 

Set-MsolUser -UserPrincipalName olduser@mydomain.com -ImmutableId vMZGJpW6CUGY09bduJ5dlw==</pre><p></p>
<p id="gxeKOAr" style="text-align: justify;"><img class="alignnone size-full wp-image-1303 " src="http://www.e-apostol...a46a11e745.png"alt="" srcset="http://www.e-apostolidis.gr/wp-content/uploads/2017/06/img_594a46a11e745.png 579w, http://www.e-apostol...e745-300x21.png 300w" sizes="(max-width: 579px) 100vw, 579px" /></p>
<p style="text-align: justify;">Step 5.</p>
<p style="text-align: justify;">Open the Office 365 Admin Center and Delete the old user “OLDUSER”</p>
<p style="text-align: justify;">Go to Users –&gt; Active users –&gt; Select the “OLDUSER” –&gt; click Delete user</p>
<p id="VoMSGyP" style="text-align: justify;"><img class="alignnone size-full wp-image-1304 " src="http://www.e-apostol...a46e3db163.png"alt="" srcset="http://www.e-apostolidis.gr/wp-content/uploads/2017/06/img_594a46e3db163.png 505w, http://www.e-apostol...163-300x129.png 300w" sizes="(max-width: 505px) 100vw, 505px" /></p>
<p style="text-align: justify;">Step 6.</p>
<p style="text-align: justify;">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.</p>
<p style="text-align: justify;">Step 7.</p>
<p style="text-align: justify;">Make the “NEWUSER” user account a Remote Mailbox object</p>
<p style="text-align: justify;">At the on-premises Exchange, open the Exchange Management Shell and run:</p>
<p></p><pre class="crayon-plain-tag">Enable-RemoteMailbox -Identity NEWUSER -DisplayName "NEW USER" -RemoteRoutingAddress newuser@mydomain.onmicrosoft.com -Alias newuser -PrimarySmtpAddressnewuser@mydomain.com</pre><p></p>
<p style="text-align: justify;">Step 8.</p>
<p style="text-align: justify;">Move the “NEWUSER” to an OU that is Synced with Azure AD and run a Delta Sync like Step 3.</p>
<p style="text-align: justify;">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.</p>
<p>&nbsp;</p>
<p>I suppose there are other ways, maybe easier, to accomplish this task, but following this process you will have the desired result without problems.</p>
<p><a class="a2a_button_email" href="https://www.addtoany...ybrid Scenario"title="Email" rel="nofollow" target="_blank"></a><a class="a2a_button_print" href="https://www.addtoany.com/add_to/print?linkurl=http%3A%2F%2Fwww.e-apostolidis.gr%2Fmicrosoft%2Foffice-365%2Fhow-to-disconnect-a-mailbox-re-assign-it-to-new-user-in-a-hybrid-scenario%2F&amp;linkname=How%20to%20disconnect%20a%20mailbox%20%26%20re-assign%20it%20to%20new%20user%20in%20a%20Hybrid%20Scenario" title="Print" rel="nofollow" target="_blank"></a><a class="a2a_dd addtoany_share_save" href="https://www.addtoany.com/share#url=http%3A%2F%2Fwww.e-apostolidis.gr%2Fmicrosoft%2Foffice-365%2Fhow-to-disconnect-a-mailbox-re-assign-it-to-new-user-in-a-hybrid-scenario%2F&amp;title=How%20to%20disconnect%20a%20mailbox%20%26%20re-assign%20it%20to%20new%20user%20in%20a%20Hybrid%20Scenario" data-a2a-url="http://www.e-apostolidis.gr/microsoft/office-365/how-to-disconnect-a-mailbox-re-assign-it-to-new-user-in-a-hybrid-scenario/" data-a2a-title="How to disconnect a mailbox & re-assign it to new user in a Hybrid Scenario"><img src="https://static.addtoany.com/buttons/share_save_171_16.png" alt="Share"></a></p><p>The post <a rel="nofollow" href="http://www.e-apostolidis.gr/microsoft/office-365/how-to-disconnect-a-mailbox-re-assign-it-to-new-user-in-a-hybrid-scenario/">How to disconnect a mailbox & re-assign it to new user in a Hybrid Scenario</a> appeared first on <a rel="nofollow" href="http://www.e-apostolidis.gr">Apostolidis IT Corner</a>.</p>


<a href="http://www.e-apostol...brid-scenario/"class='bbc_url' rel='nofollow external'>Source</a>