Move Microsoft 365 Domain Federation from AD FS to a Third-Party SAML Provider
Question details
Configure a Microsoft 365 domain to use a third-party SAML identity provider instead of AD FS.

- Product
- Microsoft 365 and Microsoft Entra ID
- Device & OS
- not provided
- Scenario
- An administrator is moving a federated domain from AD FS to a third-party identity provider for single sign-on.
- Observed behavior
- The Convert-MsolDomainToFederated command requires an AD FS connection, making it unsuitable for configuring the third-party provider.
Confirm that the identity provider supports Microsoft Entra domain federation using SAML 2.0, and obtain its federation settings and migration instructions. Prepare a cloud-only emergency administrator account and plan a test or maintenance window because changing federation settings can interrupt sign-in.
Update the domain federation configuration with Microsoft Graph
Use Microsoft Graph PowerShell to replace an existing AD FS federation configuration with settings supplied by the third-party identity provider.
Convert-MsolDomainToFederated is designed for AD FS. Older guidance recommends Set-MsolDomainAuthentication for third-party providers, but the MSOnline PowerShell module is retired; use the current Microsoft Graph federation APIs instead.
In the identity provider's administration portal, locate its Microsoft Entra or Microsoft 365 federation instructions. Obtain the issuer URI, sign-in endpoint, signing certificate, and other required values, and verify the provider's SAML assertion and user identifier requirements.
Open PowerShell, install the Microsoft.Graph.Identity.DirectoryManagement module if needed, and run Connect-MgGraph -Scopes "Domain.ReadWrite.All". Sign in with an account authorized to manage domain federation and grant the required consent.
Run Get-MgDomainFederationConfiguration -DomainId "example.com", replacing the domain with your verified domain. Record the existing federation configuration ID and compare its settings with the provider's migration instructions.
Build a $params hashtable using the provider's documented values and Microsoft Graph internalDomainFederation properties. Run Update-MgDomainFederationConfiguration -DomainId "example.com" -InternalDomainFederationId "<configuration-id>" -BodyParameter $params, replacing the domain and ID with your values.
Open a private browser window and sign in to Microsoft 365 with a test user in the federated domain. Confirm that authentication redirects to the new provider and completes successfully; retain access to the cloud-only emergency administrator account.

Use WPS Office as an Alternative for Everyday Office Work
WPS Office is a free, lightweight office alternative with a familiar interface and support for common Microsoft Office formats, making it easier to move existing files. It does not change Microsoft Entra federation or fix Microsoft 365 sign-in.

Frequently Asked Questions
Why does Convert-MsolDomainToFederated ask for AD FS?
The command is intended to work with an AD FS server. For a third-party SAML provider, use the provider's Microsoft Entra federation instructions and the current Microsoft Graph federation APIs instead.
Can I still use Set-MsolDomainAuthentication?
Older third-party federation instructions reference Set-MsolDomainAuthentication, but it belongs to the retired MSOnline module. Use Microsoft Graph PowerShell or the Microsoft Graph API for current domain federation management.
What settings do I need from the SAML provider?
Obtain the issuer URI, sign-in endpoint, signing certificate, and any other values specified in the provider's Microsoft Entra federation guide. Also confirm that its SAML assertions and user identifiers meet Microsoft's requirements.
How can I check the domain's current federation settings?
After connecting with the required permissions in Microsoft Graph PowerShell, run Get-MgDomainFederationConfiguration -DomainId "example.com" using your domain name.
Who can help if the third-party SAML provider is not working?
Contact the identity provider for help deploying or troubleshooting its configuration. Microsoft does not support deployment or troubleshooting of third-party identity providers.




