question

MarkCockburn-0871 avatar image
0 Votes"
MarkCockburn-0871 asked Danstan-MSFT answered

Moving messages using graph API

Hi,

I have a requirement to move messages from a folder in one mailbox to a folder in another.

It seems that graph only allows moving to folders within same account.

I have access to 2 accounts to test with, and I can easily move by dragging in outlook (which would seem to indicate to me that it should be possible).

I am using c# SDK, is there any help that you can give me here.

The above is my preferred option, however I have also considered the below.

As an alternative, since I am trying to return a message to a user, I have tried adding as an attachment and forwarding back. I can download mime content of message and add as a .eml file attachment and this work but this is not ideal, since the attachment email can't be viewed directly within outlook.

It seems that in order to attach an existing message I would have to iteratively go through the message and recreate any child / grandchild events / messages and file attachments etc Is there a way to attach an existing message without doing this.

Thanks

microsoft-graph-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Danstan-MSFT avatar image
0 Votes"
Danstan-MSFT answered

Microsoft Graph API does not currently support the movement of messages between two mailboxes. The operation depends on the size of the mailbox.

I suggest you work with these two options that I am not 100% sure about.

  1. Use the client side export import tools to move messages.

  2. Work with your Exchange administrator to perform the move using PowerShell.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.