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
676 stars 95 forks source link

Cannot install add-in in shared or delegate mailbox in OWA #1877

Closed sarea closed 3 years ago

sarea commented 3 years ago

when I open another mailbox from the top left menu, I'm not able to install an add-in there, I got an error message that says:

The operation on mailbox failed because it's out of the current user's write scope.

Screenshot 2021-05-20 at 11 12 57

We couldn't find a way in the admin settings or in the online exchange settings to give that permission. Even when installing the add-in from the admin center for that mailbox, we don't get it installed.

For the delegate accounts, that's fine, as we can log in to those accounts using the email id and the password and install the add-in, but the shared mailbox doesn't have a way to log in directly.

Knowing that this functionality used to work a while ago.

exextoc commented 3 years ago

when I open another mailbox from the top left menu, I'm not able to install an add-in there, I got an error message that says:

The operation on mailbox failed because it's out of the current user's write scope.

Screenshot 2021-05-20 at 11 12 57

We couldn't find a way in the admin settings or in the online exchange settings to give that permission. Even when installing the add-in from the admin center for that mailbox, we don't get it installed.

For the delegate accounts, that's fine, as we can log in to those accounts using the email id and the password and install the add-in, but the shared mailbox doesn't have a way to log in directly.

Knowing that this functionality used to work a while ago.

Can you please specify which client is this? Is this happening in Outlook on the Web/Mac/Win32 or mobile client?

sarea commented 3 years ago

Hi @exextoc, it's on the OWA

exextoc commented 3 years ago

Can you please share us a repro video and/or the exact repro steps of this issue? This would help us try to repro this locally.

sarea commented 3 years ago

Hi @exextoc, step to reproduce the issue:

Hope that helps

exextoc commented 3 years ago

Open Another Mailbox" scenario is not fully supported on Outlook Web Add-ins as of now. We are working on our document update to reflect this status. We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered, when we go through our planning process.

ghost commented 3 years ago

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

Emailgistics-Arjun commented 3 years ago

With support for shared mailboxes in the preview addin. Will this issue be resolved?

exextoc commented 3 years ago

@Emailgistics-Arjun - not quite and I'd like to elaborate on why that's the case. For now I'll be concentrating on delegateAccess feature (which is in production for OWA) - a user in the org having shared their folders with you/provided you with delegate access to their mailbox. I'll get to sharedMailboxes later here.

The moment you're logging into the delegate account using the email and pwd, it's not technically a sharedFolder anymore. It's as though you're signing into your own account. From an add-ins perspective of what we call 'support for delegateAccess/sharedFolders', this is not truly a sharedFolder scenario (I'll also get to the proper way of setting this up). The moment you log in to the account explicitly, you'll get add-ins that were installed for that secondary account but the items will no longer be considered in a shared context.

Our feature for sharedFolders/delegateAccess let's you run add-ins that you have installed for your mailbox, on a mailbox the other user has shared with you. You don't need to install the same add-in on the other users mailbox to be able to use it. In the example shared above, user A has access to user B's mailbox (user B delegated their mailbox to user A). From addins side, what we support is that the add-ins user A has available for their mailbox, the same add-ins can be used when navigating to items in User B's mailbox (User B might as well have 0 add-ins installed for themselves). There is however a dependency that the add-in developers should support sharedFolders (in their manifest) too for the add-in installed for user A to work when accessing items from user B's account. If the specific add-in in question doesn't mark support for sharedFolders in their manifest, you won't be able to use that addin when accessing user B's account.

To be able to set this up, all user A needs to do is navigate to OWA, then from the left navigation pane (where folder structures are present), right click on the parent Folder tree called 'Folders' and then hit 'Add sharedFolder' and enter User B's email address. This will add User B's mailbox to your navigation pane and user A can access folders/items from User B's account. Now, when you navigate to an item in User B's mailbox, we load all add-ins from User A's account and show only those add-ins that have the manifest change for sharedFolders. All other add-ins will be hidden. This is a true sharedFolder/delegateAccess scenario from add-ins perspective.

Now speaking of sharedMailboxes - sharedMailboxes share the same concept as sharedFolders, you don't need the add-in installed for the sharedMailbox to be able to use it or log into the sharedMailbox. You just need to mount the sharedMailbox correctly (as above) to be able to use addins (assuming they have the manifest change) when accessing items from a sharedMailbox. That said, sharedMailboxes support is in preview and only for win32 right now. As and when it goes into preview for OWA, we'll update the documentation to reflect that.

Hope this helps and feel free to get back to us if you have any questions or require further clarifications.

ghost commented 3 years ago

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

ghost commented 3 years ago

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.