Is it possible to access the root folder of a delegated mailbox in Outlook?

Diksha Yadav 21 Reputation points

When trying to access users/<emailid>/messages for a delegated mailbox, I receive a 404 error. Is there a way to give a delegate user access to the root folder of a delegated mailbox? The error message I'm receiving is:

    "error": {
        "code": "ErrorItemNotFound",
        "message": "The specified object was not found in the store., Default folder AllItems not found."
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,104 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 31,896 Reputation points

    Hi @Diksha Yadav

    Did you forget to pass the mailbox folder id? It should be:

    GET /users/{id | userPrincipalName}/mailFolders/{id}/messages

    If the target user only delegates you to access their specific mailbox folder, then you will be able to list all the mails in that folder. If the target user delegates you to access their entire mailbox, then you will be able to list all the mails of the target user. vice versa.

    Reference: Get Outlook messages in a shared or delegated folder.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.