HTTP Status code 404

Symptoms

Error: "Status Code: 404 | Status Reason: Unauthorized"

Error: Error response returned from the Message Trace request to Microsoft Graph API

Error: The API endpoint cannot be resolved or the requested resource is unavailable

Causes

A 404 response usually indicates that the requested API endpoint or resource cannot be found. This error can occur when:
  • The Microsoft Graph API endpoint is incorrect or unavailable.
  • The API request references an unsupported API version or resource.
  • The application does not have the required permissions to access Message Trace data in Exchange Online.
  • The Message Trace service is not accessible for the configured tenant

Resolving the problem

To resolve your HTTP Status code 401 error, verify that the following conditions are met.
  • Verify that the Microsoft Graph API endpoint configured in the log source is correct.
  • Ensure that the application registered in Microsoft Entra ID has the required Microsoft Graph application permissions to access Message Trace data.
  • Ensure that administrator consent is granted for the required permissions.
  • Verify that a service principal is provisioned for Exchange Online for the registered application.
  • Verify that the tenant supports access to the Message Trace API.
For more information about provisioning a service principal and configuring permissions, see Graph-based message trace API onboarding guide