Share via

Copy message between shared mailboxes using Graph

Oliver Dixon 15 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 | Windows | Classic Outlook for Windows | For business
Microsoft Security | Microsoft Graph

1 answer

Sort by: Most helpful
  1. Anonymous
    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.

    Was this answer helpful?

    1 person found 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.