0

I am working on custom outlook web add-in where I need to move the email from my Inbox to the selected Microsoft Group mailbox programmatically.

I checked the move-message endpoint https://learn.microsoft.com/en-us/graph/api/message-move but that requires destination folder Id which I am not able to get it.

Is this possible using Graph API or any other way?

Sushrut Paranjape
  • 429
  • 2
  • 4
  • 17

1 Answers1

1

The Graph API doesn't support moving messages between mailboxes so what you described wouldn't work at least with the move operation even if you had the Id. There are also some limitations around shared mailboxes in add-ins https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/delegate-access?tabs=windows

Glen Scales
  • 20,495
  • 1
  • 20
  • 23
  • also adding that the office.js api currently doesn't allow moving of messages. So only what is supported by Graph will work. (to which Glen's reply is accurate) – Outlook Add-ins Team - MSFT Sep 29 '22 at 01:44
  • Thanks Glen and outlook team! Is there a way I can move the mail to group mailbox other than Graph API? If I drag and drop the email in the outlook client from Inbox to group mailbox, it copies the item and then deletes from the mailbox as I see in the network logs. I think I will need to do similar way to move the mail. – Sushrut Paranjape Sep 30 '22 at 10:35
  • Not within the context of an Addin, EWS does support moving items between mailboxes but as per the link i posted it isn't supported in Delegate/Shared scenarios for an Addin. You could build a separate web app to do the move and trigger that from your addin but it gets a lot more complex and changes the security and supportability contexts. – Glen Scales Oct 03 '22 at 23:19