Intermittent 404 when reading child folders from Graph API

Jeffrey Wong 0 Reputation points
2025-12-03T00:48:38.3033333+00:00

I've been getting intermittent 404 while reading child folders using the same bearer token, which is a tenant access token.

basically when accessing https://graph.microsoft.com/v1.0/users/<mailbox address>/mailFolders/<folder id>/childFolders, sometimes I get 404 which took over 7s with response

{
    "error": {
        "code": "ErrorItemNotFound",
        "message": "The specified object was not found in the store., Can't connect to the mailbox of user Mailbox database guid: <redacted> because the ExchangePrincipal object contains outdated information. The mailbox may have been moved recently."
    }
}

and sometimes I get 200 within 200ms


{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('<mailbox address>')/mailFolders('<folder id>')/childFolders",
    "value": []
}

anyone has experienced this or have any idea what's going on?

Microsoft 365 and Office | Office Online Server
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-03T00:48:46.72+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The intermittent 404 error you are experiencing when accessing child folders using the Microsoft Graph API could be related to the state of the mailbox or the replication of data within the Microsoft Entra ID architecture. The error message you received indicates that the mailbox may have been moved recently, and the ExchangePrincipal object contains outdated information. This can happen due to replication delays when the mailbox is moved or updated, which may lead to temporary unavailability of the mailbox data.

    In scenarios like this, it is advisable to implement a retry mechanism in your application. If you encounter a 404 error, you can wait for a brief period and then attempt the request again. This allows time for any replication processes to complete and for the mailbox information to be updated across the data centers.

    Additionally, ensure that the bearer token you are using has the necessary permissions to access the mailbox and its folders, as permission issues can also lead to 404 errors.


    References:

    0 comments No comments

  2. Kha-N 5,685 Reputation points Microsoft External Staff Moderator
    2025-12-03T02:11:32.1366667+00:00

    Hi @Jeffreywong,

    Welcome to Microsoft Q&A, and thank you very much for reaching out to us.

    Based on your description, could you confirm whether the mailbox you were checking is your own or another user’s? If it’s another user’s mailbox, was it created recently?

    Also, when you mentioned the error happens “sometimes”, may I verify that mean it occurs inconsistently, or are you able to reproduce it reliably?

    This will help me research your issue further and find solution that tailor to your situation.

    Looking forward to your response.


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.