Pages

Wednesday, October 16, 2013

Exchange Online Source Anchor Update or Restore MailBox in Exchange Online Office 365

Process 2: Exchange Online Source Anchor Update or Restore MailBox in Exchange Online

This Process is necessary when the process 1.1 failed to move the user from Federated Domain to Managed Domain. The following tasks needs to be performed to update the Source Anchor Attribute.

 2.1 User Moving from Active State to Removable State in Exchange Online.

 2.1.1 Remove the User Windows Azure AD

 Remove-MsolUser -UserPrincipalName <User Principal Name> -force
 
        

 2.1.2 Remove the User from the Recycle Bin Windows Azure AD

 Remove-MsolUser -UserPrincipalName <User Principal Name> -force -RemoveFromRecycleBin

2.2 Linking Existing user from Removable State to Active State

If the process 2.1.1 and 2.1.2 Executed successfully, The user moved from Active State to Removable State in Exchange online and his Mail Box is Disconnected State in the Exchange Online. You need to wait 5 to 10 minutes to replicate the changes from Windows Azure AD to Microsoft Online. The following Commands needs to be executed to relinking the mailbox. They are

Get The Removable State Guid:

Get-RemovedMailbox UPN | Select Guid

Relink MailBox

New-MailBox -Name <Name> -RemovedMailbox <Guid> -FirstName <First Name> -LastName <Last Name> -DisplayName <Display Name> -MicrosoftOnlineServicesID <UPN>  -PrimarySmtpAddress <UPN> -ImmutableId <Immutable ID> -FederatedIdentity <Federated ID>
Federated is unique and should not contain any @ symbol. For example Federated is 123456789                   

2.3 Assign the Licenses to complete the Process

You need to wait 5 to 10 minutes to replicate the changes from  Microsoft Exchange Online to Windows Azure AD. The following Commands needs to be executed to assign the license. They are

 Update the Country Info to the User

 set-msoluser -UserPrincipalName <UPN> -UsageLocation "US" 
 Assign the License to the User
       
Set-MsolUserLicense -UserPrincipalName <UPN> -AddLicenses test:EXCHANGESTANDARD_STUDENT

Updating Immutable ID or Source Anchor or Federated ID in Office 365 or Exchange Online using Power Shell

Problem:

The On Premise users are not able to login in OutLook.com/MailDomain integrated with Federated Environment Such as AD FS or Shibboleth. The actual result is, the user always redirect to outlook.com login page after successfully authenticated against the on premise domain.

Cause:

Federated ID Is Missing in the Exchange Online or Immutable ID Attribute is Missing in the Azure AD.

Solution:


Two Ways to Update the Source Anchor Or Immutabe ID attribute using Windows Azure AD or Microsoft Exchange Online Command Lets.

Pre-Requisit

1. Install the Office 365 Command Lets
2. Install the Windows Power Shell


Process 1: Windows Azure AD Immutable ID Update in Federated Domain.

   In my examples I have used federated domain is test.edu and managed domain is test.onmicrosoft.com. You can replace with your own federated and managed domains before executing the command lets. The following tasks needs to be performed to update the Immutable ID in the Federated Domain.


    1.1 Move the User from Federated Domain to Managed Domain.
   
The following command needs to be execute to move the user from federated domain to non federated domain.

     Set-MsolUserPrincipalName -UserPrincipalName usrabc@test.edu -NewUserPrincipalName usrabc@testmain.onmicrosoft.com

    1.2. Update the Immutable ID in Managed Domain

The following command needs to be execute to update the Immutable ID in non federated domain.

 Set-MsolUser -UserPrincipalName usrabc@testmain.onmicrosoft.com -ImmutableId <Immutable ID>
    1.3. Move the User from Managed Domain to Federated Domain

The following command needs to be execute to move the user from managed domain to federated domain.

     Set-MsolUserPrincipalName -UserPrincipalName usrabc@testmain.onmicrosoft.com -NewUserPrincipalName usrabc@test.edu
 

Follow the Process 2 link to update the Source Anchor or Federated ID in Microsoft Exchange Online PowerShell

Continuation Process 2