Share via

Microsoft Graph Reports API: getMailboxUsageDetail returns 302 Redirect and 404 Unknown on download endpoint

Danish Rizvi 0 Reputation points
2026-01-30T20:25:47.8433333+00:00

Hi everyone,

I’m running into an issue while trying to retrieve the mailbox usage CSV using the Microsoft Graph Reports API.

I’m calling:

GET https://graph.microsoft.com/v1.0/reports/getMailboxUsageDetail(period='D30')

The request succeeds initially but returns a 302 redirect to a temporary download URL on:

https://reportsncu.office.com/data/v1.0/download?token=...

When I follow this redirect (either automatically with code or manually), the download URL consistently returns:

404 Unknown

What I’ve already verified:

  • The Azure AD App Registration has Reports.Read.All (Application) permission
  • Admin consent has been granted
  • The app successfully retrieves an access token
  • Other Microsoft Graph API calls work without issues
  • The API endpoint itself does return a redirect token (so authentication seems OK)

How to resolve this issue?

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-01-30T20:26:59.59+00:00

    It sounds like you're encountering a common issue when trying to download the mailbox usage report from the Microsoft Graph Reports API. The 302 redirect indicates that the request was successful and that you are being redirected to a temporary download URL. However, receiving a 404 error when trying to access that URL typically means that the URL is either expired or invalid.

    Here are a few steps you can take to troubleshoot and potentially resolve the issue:

    1. Check the Timing: The preauthenticated download URLs are only valid for a short period of time (a few minutes). Ensure that you are following the redirect immediately after receiving it to avoid expiration.
    2. Verify the Token: Ensure that the token included in the download URL is still valid. If the token has expired, you will receive a 404 error.
    3. Permissions: Although you mentioned that the app has the necessary permissions, double-check that the permissions are correctly set and that admin consent has been granted for the Reports.Read.All permission.
    4. Test with Different Periods: Sometimes, specific periods may not have data available. Try using different periods (e.g., D7, D90, D180) to see if the issue persists across all options.
    5. Inspect the Redirect URL: Make sure that the redirect URL you are following is exactly as provided in the response and that there are no alterations or issues with how the URL is being handled in your code.

    If the problem continues after these checks, consider reaching out to Microsoft support for further assistance, as there may be an issue on their end with the report generation or the download service.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.