Copy message between shared mailboxes using Graph

Oliver Dixon 10 Reputation points
2024-08-07T04:04:09.79+00:00

Is there any Graph solution for moving a message between shared mailboxes? When I attempt either a move or copy of a message from my Inbox to a folder in a shared mailbox I receive the following error:

Item '...' doesn't belong to the targeted mailbox '...'.

As I understand it, Graph move and copy operations are scoped to the users mailbox. In Office-js this is possible with makeEwsRequestAsync using the CopyItem method, however this is being deprecated in October 2024. I know it is not an access issue as I can manually do it in Outlook by dragging the selected message into the destination folder in the side-pane. I would consider this an essential Graph requirement.

Outlook
Outlook
A family of Microsoft email and calendar products.
4,025 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,282 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 6,575 Reputation points Microsoft Vendor
    2024-08-07T09:04:17.0866667+00:00

    Hi @Oliver Dixon

    According to the documentation, this endpoint is used to copy a user's mail from one folder to another folder, where the target mailbox needs to be a mailbox belonging to that user.

    However, a shared mailbox is a separate mailbox that does not belong to a single user, so you cannot use the API to copy messages to a shared mailbox.

    The EWS Move and Copy operations do support moving items between mailboxes.

    Please refer to the link below for more information:

    https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-move-and-copy-email-messages-by-using-ews-in-exchange

    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.


Your answer

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