Point Microsoft 365 Federation to a New AD FS Server
Question details
The organization needs Microsoft 365 federation to use a new on-premises AD FS server.

- Product
- Microsoft 365 and Active Directory Federation Services
- Device & OS
- not provided
- Scenario
- An administrator is replacing an AD FS server and wants to know whether connecting to Microsoft Online and setting the AD FS context is sufficient.
- Observed behavior
- The administrator needs to determine whether the federated domain trust or its endpoints must be updated before users can sign in through the new server.
Identify the federated domain, its current sign-in and federation metadata URLs, and whether those URLs will change. Confirm that the new AD FS service, certificates, DNS, and external access are ready, and use an account authorized to manage federation.
Check and update the Microsoft Entra ID federation trust
Use this approach when replacing an AD FS server, especially if federation endpoints or certificates will change.
Connecting to Microsoft Online and setting an AD FS context alone do not update the federated domain trust. If the new server continues to serve the same federation service name and endpoints, a server replacement does not necessarily require a change to the cloud trust.
The older MSOnline commands, including Update-MsolFederatedDomain, are retired. Use current Microsoft Entra federation management tools rather than relying on those commands.
In the Microsoft Entra admin center, open Identity > Custom domain names and select the federated domain. Compare its federation configuration with the service name and endpoints planned for the new AD FS deployment.
From a browser, open the new service's federation metadata URL, typically https://<federation-service-name>/FederationMetadata/2007-06/FederationMetadata.xml. Confirm that the metadata is reachable and that DNS and certificates match the intended service name.
If the federation endpoints or trust information have changed, open Microsoft Entra Connect and select Additional tasks > Manage federation. Use the available option to repair the Microsoft Entra ID and AD FS trust, or follow Microsoft's current guidance for updating domain federation settings with Microsoft Graph.
After allowing time for changes to propagate, open a private browser window and sign in to Microsoft 365 with a test account in the federated domain. Check that the sign-in reaches the intended AD FS service and completes successfully.
Work with Office files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office file compatibility, making it easy to move everyday document work. It does not repair Microsoft 365 or AD FS federation.

Frequently Asked Questions
Are Connect-MsolService and Set-MsolADFSContext enough to update federation?
No. Those commands only connected to Microsoft Online and selected an AD FS context; they did not update the federated domain trust. The MSOnline module is retired, so use current Microsoft Entra federation management tools.
Do I need to update the trust if only the AD FS server changes?
Not necessarily. If the federation service name, endpoints, and trust information remain unchanged, the existing cloud trust may still apply. Verify the metadata URL and test sign-in through the new server.
Where can I check whether my domain is federated?
In the Microsoft Entra admin center, open Identity > Custom domain names and select the domain to review its authentication configuration.
How can I verify the new AD FS service after the cutover?
Open the federation metadata URL in a browser, then use a private browser window to sign in to Microsoft 365 with a test account from the federated domain. Confirm that authentication completes through the intended service.




