<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
How to Use PowerShell to Disable Manual Federation Between Okta and Microsoft Office 365
Single Sign-On
Okta Integration Network
Office 365
Okta Classic Engine
Okta Identity Engine
Overview

This article describes how to use PowerShell to disable the Microsoft Office 365 manual federation.

Applies To
  • Microsoft Office 365
  • Federation (WS-FED)
  • PowerShel
  • Okta Classic Engine
  • Okta Identity Engine (OIE)
Solution

If Microsoft Office 365 is federated with Okta via PowerShell, it can only be de-federated using Microsoft's PowerShell Module as detailed below:

  1. Connect to the Office 365 instance via PowerShell.
  2. Further, there are two methods:
    1. Microsoft Online (MSOnline) method:
      • Once connected, run the following PowerShell cmdlet to change Federation Authentication from Federated to Managed:
        Set-MsolDomainAuthentication -DomainName <theO365Domain.com> -Authentication managed
      • To check Federation status, run this cmdlet:
        Get-MsolDomainFederationSettings -DomainName <theO365Domain.com>
    1. Microsoft Graph (MgGraph) method:
      • To connect and remove the federation, run the following PowerShell cmdlet:
        Connect-MgGraph -Scopes Directory.AccessAsUser.All
        Remove-MgDomainFederationConfiguration -DomainId <DomainName> -InternalDomainFederationId (Get-MgDomainFederationConfiguration -DomainId <DomainName> | Select -Property Id).id
NOTE: Replace <DomainName> with the desired federated domain name (for example, acme.com).



 

NOTE: Please test any PowerShell scripts extensively before running them in a production environment.

Related References

Loading
How to Use PowerShell to Disable Manual Federation Between Okta and Microsoft Office 365