This article describes how to use PowerShell to disable the Microsoft Office 365 manual federation.
- Microsoft Office 365
- Federation (WS-FED)
- PowerShel
- Okta Classic Engine
- Okta Identity Engine (OIE)
If Microsoft Office 365 is federated with Okta via PowerShell, it can only be de-federated using Microsoft's PowerShell Module as detailed below:
- Connect to the Office 365 instance via PowerShell.
- Further, there are two methods:
-
- 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
- Once connected, run the following PowerShell cmdlet to change Federation Authentication from Federated to Managed:
-
-
-
- To check Federation status, run this cmdlet:
Get-MsolDomainFederationSettings -DomainName <theO365Domain.com>
- To check Federation status, run this cmdlet:
-
-
- 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
- To connect and remove the federation, run the following PowerShell cmdlet:
-
acme.com).
NOTE: Please test any PowerShell scripts extensively before running them in a production environment.
