Troubleshoot AD FS 3.0 and SimpleSAMLphp Sign-In Loops for Office 365
Question details
The user needs to integrate SimpleSAMLphp as an external identity provider for AD FS 3.0 and resolve Office 365 sign-in loops.

- Product
- Office 365, AD FS 3.0, and SimpleSAMLphp
- Device & OS
- not provided
- Scenario
- Users sign in to Office 365 through AD FS, which delegates authentication to SimpleSAMLphp.
- Observed behavior
- Authentication can loop when federation protocols, trusts, claims, endpoints, or certificates do not match.
Gather the federation metadata, identifiers, endpoint URLs, and certificate details for AD FS and SimpleSAMLphp. Confirm which protocol is used between each service and identify a test account affected by the loop.
Validate AD FS and SimpleSAMLphp federation settings
Use this approach to find mismatched trusts, endpoints, certificates, or claims before testing sign-in again.
Open AD FS Management and select Trust Relationships > Claims Provider Trusts. Review the SimpleSAMLphp trust and compare its identifier, endpoints, and signing certificates with the identity provider's metadata.
In AD FS Management, select Trust Relationships > Relying Party Trusts and review the Office 365 trust. Verify its identifiers, endpoints, and certificates against the applicable federation configuration.
Open the trust's claim rules in AD FS Management and check that SimpleSAMLphp supplies the claims AD FS needs and that AD FS issues the claims Office 365 expects. Review the configured authentication methods on both sides.
Start a new browser session and sign in to Office 365 with the affected test account. Check whether the browser completes authentication instead of returning repeatedly to an identity provider.

Trace the redirects and review AD FS events
Use logs and a browser trace to identify where authentication returns to an earlier step.
Work with Office documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing compatible Office files. Move existing documents into WPS to continue working; it does not repair Office 365 federation or sign-in settings.

Frequently Asked Questions
Does Office 365 support only AD FS as an identity provider?
No. Office 365 can use other supported identity-provider configurations. However, support for a custom SimpleSAMLphp-to-AD FS integration may be limited; check the current Microsoft and identity-provider documentation for your configuration.
Where can I find AD FS errors for a sign-in loop?
On the AD FS server, open Event Viewer and go to Applications and Services Logs > AD FS > Admin. Look for events matching the time of the failed sign-in.
What should I check if the browser keeps redirecting between AD FS and SimpleSAMLphp?
Compare the claims provider trust with the SimpleSAMLphp metadata, including identifiers, endpoints, signing certificates, and the federation protocol. Use the browser developer tools Network tab to see which redirects repeat.
Can WPS Office fix an Office 365 federation sign-in loop?
No. The loop must be resolved in the identity-provider, AD FS, or Office 365 federation configuration. WPS Office can be used separately to work with compatible local Office files.




