Fix an AD FS 3.0 Sign-In Redirection Loop
Question details
Identify why Microsoft 365 sign-in repeatedly redirects through Web Application Proxy after AD FS authentication.

- Product
- AD FS 3.0 and Microsoft 365
- Device & OS
- not provided
- Scenario
- A federated user signs in to Microsoft 365 through AD FS and Web Application Proxy.
- Observed behavior
- After apparently successful authentication, the browser repeatedly redirects instead of completing sign-in.
Identify an affected user's Microsoft 365 account and corresponding on-premises Active Directory account. Have an administrator with access to Microsoft Entra Connect, AD FS logs, and the Microsoft 365 user account perform the checks.
Verify and correct the user's Immutable ID mapping
Use this check when credentials appear valid but federation repeatedly redirects the user. Incorrect Immutable IDs caused the loop in the reported case.
The cloud user's Immutable ID must correspond to the source anchor used for the correct on-premises account. The source anchor attribute and its encoded value depend on the Microsoft Entra Connect configuration.
On the Microsoft Entra Connect server, open Microsoft Entra Connect and select View current configuration. Check which source anchor attribute is configured for user synchronization.
Use Microsoft Graph PowerShell to inspect the affected user's OnPremisesImmutableId, for example: Get-MgUser -UserId user@example.com -Property OnPremisesImmutableId,UserPrincipalName | Select-Object UserPrincipalName,OnPremisesImmutableId.
In Active Directory Users and Computers, locate the corresponding on-premises account and inspect the configured source anchor attribute. Compare its correctly encoded value with the cloud user's OnPremisesImmutableId, following the configured synchronization rules.
If the values do not match, have the identity administrator correct the synchronization or identity mapping using the appropriate Microsoft Entra Connect procedure. Then open a fresh browser session and retry Microsoft 365 sign-in.

Check AD FS logs, authentication methods, and proxy routing
Use these checks if the identity mapping is correct or the loop continues after it is fixed.
Work with Office files in WPS Office
WPS Office is a free, lightweight, easy-to-use Microsoft Office alternative with a familiar interface and support for common Office formats, making it easier to move existing files. It does not fix AD FS or Microsoft 365 authentication.

Frequently Asked Questions
Can an incorrect Immutable ID cause an AD FS sign-in loop?
Yes. If the Microsoft 365 user's Immutable ID does not match the source anchor for the intended on-premises account, federation can fail even when credentials appear valid. Check the Microsoft Entra Connect configuration and the cloud user's OnPremisesImmutableId.
Where can I find errors for an AD FS sign-in attempt?
On the AD FS server, open Event Viewer and navigate to Applications and Services Logs > AD FS > Admin. Check events recorded at the time of the user's sign-in attempt.
Why is an internal user being redirected through Web Application Proxy?
Internal DNS or routing may be directing the federation request to the proxy. Compare sign-in behavior inside and outside the organization, then review the internal DNS records and routing for the federation service.
Should I change the cloud Immutable ID immediately if it looks wrong?
No. First confirm the correct on-premises account, the configured source anchor attribute, its encoding, and the synchronization rules. An identity administrator should use the appropriate correction procedure for the environment.




