Blog Layout

How to Hard Match Office 365 Identities to On-Premise Users

Akins IT • Jan 08, 2020

When migrating from on-premise exchange to Office 365, IT administrators can experience failure when attempting to soft match identities. Soft matching (also known as "SMTP matching") can fail for many reasons, the common one being because Office 365 detects that the email is already associated with another object. In the case of a soft match failure, a hard match must be performed. The solution to this is to stamp the online identities immutable ID with the GUID from the on-premise user, which can be done on-premise on the Active Directory server.



This is a simple PowerShell solution to hard match an on-premise GUID to an immutable ID for an online user. This ensures that all on-premise identities are correctly matched and linked to the Office 365 identities, which allows for full Office 365 write-back functionality in an organization's environment.

Provided below is the step-by-step guide on how to carry out this solution:

  1. Remove on-premise Identity from syncing with O365
  2. Remove on-premise Identity from O365 and Remove from Recycle bin
  3. Launch Powershell and run the following Commands
  4. Set-ExecutionPolicy RemoteSigned
  5. $credential = Get-Credential
  6. Input admin credentials for Office 365 and run the following command
  7. Import-Module MsOnline
  8. Connect-MsolService -Credential $credential
  9. Run “$ADGuidUser = Get-ADUser -Filter * | Select Name,ObjectGUID | Sort-Object Name | Out-GridView”
  10. Select the on-premise user from the Grid
  11. Run “$UserimmutableID = [System.Convert]::ToBase64String($ADGuidUser.ObjectGUID.tobytearray())” in powershell to convert GUID to the immutable ID format
  12. Run $OnlineUser = Get-MsolUser | Select UserPrincipalName,DisplayName,ProxyAddresses,ImmutableID | Sort-Object DisplayName | Out-GridView -Title "Select The Office 365 Online User To HardLink The AD User To" -PassThru”
  13. Select the Online identity to match on-premise identity
  14. Run “Set-MSOLuser -UserPrincipalName $OnlineUser.UserPrincipalName -ImmutableID $UserimmutableID”
  15. Set the Online identity with the new immutable ID
  16. Run “Set-MSOLuser -UserPrincipalName $OnlineUser.UserPrincipalName -ImmutableID $UserimmutableID”
  17. Check the immutable id matches
  18. Run the following two lines and confirm IDs Match
    “Write-Host "AD Immutable ID Used" $UserimmutableID”
    “Write-Host "Office365 UserLinked" $Office365UserQuery.ImmutableId”
CONTACT US TO LEARN MORE ABOUT THIS TOPIC OR TO SCHEDULE A CALL
By Shawn Akins 15 Apr, 2024
In the ever-evolving landscape of the digital workplace, Microsoft 365 Copilot stands as a beacon of innovation, guiding users through the complexities of their daily tasks with ease and efficiency. As we embrace this new era of work, understanding the capabilities and utilization of Copilot prompts becomes essential. What are Copilot Prompts? Copilot prompts are intelligent cues that empower users to harness the full potential of Microsoft 365. They are designed to understand the context of your work and provide suggestions that are not only relevant but also tailored to enhance productivity.  The Power of Contextual Understanding At the heart of Copilot prompts is the advanced AI that meticulously analyzes the content you're working on. Whether it's an email, a document, or a spreadsheet, Copilot grasps the essence of your task and offers prompts that propel you forward. Streamlining Collaboration Collaboration is the cornerstone of modern work, and Copilot prompts are the perfect ally. They facilitate seamless communication by suggesting replies in emails, aiding in the co-authoring of documents, and ensuring that your team stays on the same page. Enhancing Creativity Beyond the realms of productivity, Copilot prompts also serve as a muse for your creativity. They can assist in drafting compelling narratives, generating ideas, or even crafting personalized messages that resonate with your audience. Learning and Growing with Copilot As you interact with Copilot prompts, they learn and adapt to your unique style and preferences. This continuous learning process ensures that the assistance you receive is always improving, making your experience with Microsoft 365 increasingly intuitive. Conclusion Microsoft 365 Copilot prompts are more than just a feature; they are your partner in navigating the future of work. By understanding their functionality and integrating them into your workflow, you can unlock new levels of efficiency, collaboration, and creativity.
By Shawn Akins 15 Apr, 2024
Sky at Chandler Airpark
By Leislee Mamba 18 Jan, 2024
Akins IT assists Management Support in migrating their physical server infrastructure to new hardware and enhancing their backup process for improved disaster recovery.
More Posts
Share by: