Disable Microsoft 365 / Entra ID Federation with PowerShell
- Install the Microsoft Graph PowerShell.
- Set the Execution Policy to Remote Signed:
Set-ExecutionPolicy RemoteSigned
- Connect to your Microsoft 365 / Entra ID tenant:
Connect-MGGraph -Scopes "Domain.ReadWrite.All", "Directory.AccessAsUser.All", "Organization.ReadWrite.All", "Directory.ReadWrite.All"
- Enter your Office 365 Global Administrator Credentials.
- Consent and Accept the requested scopes.
- Verify the domain is federated:
Get-MgDomain -DomainId “<YourO365Domain.com>”
- Change Federation Authentication from federated to managed:
Update-MgDomain –DomainId “<YourO365Domain.com>” -AuthenticationType Managed
- To check Federation status:
Get-MgDomain -DomainId “<YourO365Domain.com>”
- Disconnect Microsoft Graph:
Disconnect-MGGraph
No Comments