Fix Invalid SAML Token and Office 365 Sign-In Errors
Question details
Resolve an invalid SAML token or missing Integrated Windows Authentication endpoint that prevents Office 365 sign-in.

- Product
- Microsoft 365, Microsoft Entra ID, and Active Directory Federation Services (AD FS)
- Device & OS
- not provided
- Scenario
- A federated user needs to sign in to an Office 365 environment using AD FS.
- Observed behavior
- Office 365 sign-in fails with an invalid SAML token or missing authentication endpoint, even though local AD FS sign-in works.
Record the exact sign-in error, affected account, and time of the attempt. Have an authorized cloud-only administrator account available to review tenant settings without relying on federated sign-in.
Check AD FS and Microsoft Entra federation settings
Use this approach when local AD FS sign-in works but federated Office 365 sign-in fails.
Sign in to the Microsoft Entra admin center with an authorized cloud-only administrator account. Open Identity > Monitoring & health > Sign-in logs and inspect the failed attempt for its error details.
Open the AD FS federation metadata URL in a browser, using your AD FS service name followed by /FederationMetadata/2007-06/FederationMetadata.xml. Confirm that it is accessible and review the federation information and certificates for discrepancies.
On the AD FS server, open AD FS Management > Service > Endpoints. Check that the endpoints required by the affected sign-in flow are present and enabled, including the Integrated Windows Authentication endpoint if that flow requires it.
In the Microsoft 365 admin center, open Settings > Domains and identify the affected domain. Compare its federation configuration with the AD FS service settings and correct any discrepancy identified by the sign-in logs or metadata review.
Retry the affected Office 365 sign-in, then check the new entry in Sign-in logs. Record the administrative change, its reason, and the test result for future troubleshooting.

Work with Office files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with Office files. Its format compatibility can make moving existing documents to WPS straightforward. It does not repair Microsoft 365 federation or sign-in settings.

Frequently Asked Questions
Why can local AD FS sign-in work while Office 365 sign-in fails?
Local sign-in alone does not confirm that Microsoft Entra federation settings, token information, certificates, and required endpoints match. Check the failed attempt under Identity > Monitoring & health > Sign-in logs in the Microsoft Entra admin center.
Where can I check AD FS authentication endpoints?
On the AD FS server, open AD FS Management > Service > Endpoints. Review the endpoint required by the affected authentication flow and whether it is enabled.
How do I find the AD FS federation metadata?
In a browser, append /FederationMetadata/2007-06/FederationMetadata.xml to your AD FS service address. Check that the metadata is accessible and that its federation information and certificates match the intended configuration.
What if federated administrator sign-in also fails?
Use an authorized cloud-only administrator account to access the Microsoft Entra admin center and review sign-in logs and tenant configuration. If you cannot access such an account, follow your organization's administrator recovery process.




