OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
690 stars 95 forks source link

Inconsistent behavior of `MoveSpamItemTo` between Outlook classic and Outlook web, when current folder is a shared mailbox #4834

Open lmontand opened 3 months ago

lmontand commented 3 months ago

Provide required information needed to triage your issue

Your Environment

Expected behavior

The moveItemTo field of the event.completed method of an integrated spam add-in should have a the same behavior in Outlook classic and Outlook web. In particular, when using it on a shared mailbox, I would expect the email being moved to a folder of the same shared mailbox.

Current behavior

image I report an email from the red "Inbox" folder of the shared mailbox.

I would expect all Outlook versions to behave the same way as Outlook web. It is a weird behavior to have the email moved across mailboxes.

Steps to reproduce

  1. Create an integrated spam-reporting add-in
  2. Add <SupportsSharedFolders>true</SupportsSharedFolders> to the manifest
  3. Replace event.completed by the code snippet below (request to move email to a custom folder named "Phishing").
    event.completed({
    onErrorDeleteItem: true,
    moveItemTo: Office.MailboxEnums.MoveSpamItemTo.CustomFolder,
    folderName: 'Phishing',
    showPostProcessingDialog: {
        title: 'Some title',
        description: 'Some message'
    }
    });
  4. Report an email in a shared mailbox and observe where it is moved to.
Adrian-MSFT commented 2 months ago

@lmontand Thanks for reporting this issue regarding MoveSpamItemTo behavior. It has been put on our backlog. We unfortunately have no timelines to share at this point

Internal tracking id: Office: 9305597