<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
List the Office 365 ImmutableIDs Using PowerShell
Okta Integration Network
Okta Classic Engine
Okta Identity Engine
Overview

This article provides steps to get a list of Office 365 ImmutableID's using PowerShell.  This is useful when there are immutableID mismatches that can cause provisioning issues from Okta to Office 365.

This article is based on a Microsoft product, PowerShell. We suggest contacting Microsoft support if assistance is required with PowerShell and the immutableID.

Applies To
  • Office365 (O365 / M365) provisioning 
  • Azure/MS PowerShell/Windows machine
  • Okta Integration Network (OIN)
Solution

Follow the steps below:

  1. Read and install the required software on the machine as described in Microsoft Documentation: Connect with the Microsoft Azure Active Directory Module for Windows PowerShell.
  2. Launch PowerShell as an Administrator.

  3. Install the Microsoft Graph PowerShell SDK module: Install-Module Microsoft.Graph.

  4. Wait for the package to install, then type the following to enter Office 365 admin credentials and connect to Azure Active Directory via PowerShell: Connect-MgGraph -Scopes User.Read.All .

  5. Run the following command to get immutableIDs for all users:

    Get-MgUser -All | Select-Object DisplayName, UserPrincipalName, OnPremisesImmutableId

  6. Run the following command to get immutableID for a specific user:

    Get-MgUser -UserId "user@yourdomain.com" | Select-Object DisplayName, UserPrincipalName, OnPremisesImmutableId

 

Loading
List the Office 365 ImmutableIDs Using PowerShell