Troubleshoot AD FS Metadata 404 Errors in Web Application Proxy
Question details
Determine why an AD FS metadata endpoint returns HTTP 404 through Web Application Proxy and check whether federated sign-in is affected.

- Product
- Microsoft AD FS and Web Application Proxy
- Device & OS
- not provided
- Scenario
- An administrator is testing external access to an AD FS federation service for Microsoft 365 sign-in.
- Observed behavior
- Microsoft Remote Connectivity Analyzer reports HTTP 404 for /adfs/services/trust/mex and indicates that the federation service proxy blocked an illegitimate request.
Identify the federation service name and obtain the complete Microsoft Remote Connectivity Analyzer report. You will also need administrative access to the Web Application Proxy server, AD FS server, DNS settings, and relevant firewall rules.
Check sign-in scope and the Remote Connectivity Analyzer report
Use this first to determine whether the 404 affects actual federated sign-in or only a specific endpoint test.
Open the Microsoft 365 sign-in page from an internal network and from an external network. Record whether federated users can sign in from each location and whether the issue affects all users or only some.
Open the complete Remote Connectivity Analyzer report and find the failed request. Record the federation service hostname, endpoint URL, HTTP status, and any proxy-blocking message.
On the Web Application Proxy and AD FS servers, open Event Viewer and review the relevant AD FS and Web Application Proxy logs around the time of the failed request. Compare the events with the analyzer report.

Verify DNS, firewall access, and routing between the proxy and AD FS
Use these checks when the proxy cannot reach the AD FS server or external requests reach the wrong destination.
Review Web Application Proxy configuration and certificates
Use this when connectivity exists but the proxy still rejects requests or returns an unexpected response.
Work with Office files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface and support for common Microsoft Office formats, making it easy to move existing documents into your workflow. It does not repair AD FS or Web Application Proxy, and federated access to organizational services may still require a working sign-in.

Frequently Asked Questions
Does a 404 on the AD FS MEX endpoint mean Microsoft 365 sign-in is broken?
Not necessarily. Test federated sign-in from both internal and external networks, then compare the results with the full Remote Connectivity Analyzer report and server logs.
How can I test whether Web Application Proxy can reach AD FS?
On the proxy server, run Test-NetConnection with the AD FS server name and -Port 443. If it fails, investigate DNS, network routing, and firewall rules between the proxy and AD FS.
Can external users connect directly to an AD FS address such as 172.16.1.10?
No. That is a private address and is not directly routable from the public internet. Check public DNS and the firewall or load balancer that directs external HTTPS traffic to the proxy.
Where should I look for details about a blocked proxy request?
Review the full Remote Connectivity Analyzer report, then open Event Viewer on the Web Application Proxy and AD FS servers and check relevant logs at the time of the request.
What should I check on the federation certificate?
In the local computer Certificates console on the proxy, verify that the certificate used for the federation service is valid, matches the federation service name, has a private key, and chains to a trusted authority.




