Closed milczuk closed 9 months ago
More on that I've found a comment that worries me a bit: https://github.com/OfficeDev/office-js/issues/3680#issuecomment-1732860872 When multiple emails are selected, it is expected that Office.context.mailbox.item will be null [...] if it's null then there is no way for us to know the shared properties, no target mailbox address to build queries...
+1
Thanks for the questions. @samantharamon, could you please follow up?
@exextoc Could you please investigate this?
When multiple emails are selected, it is expected that Office.context.mailbox.item will be null as there are multiple items selected. Getting getSharedPropertiesAsync when multiple items are selected is not supported at present. 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.
We are also impacted by this issue. I have up-voted this suggestion
I understand that this feature is currently unsupported but not having anything indicating that we are in the context of a shared mailbox makes it impossible to provide users with a message explaining that this feature is currently unsupported. Do you have any suggestion on how we could determine that we are in this scenario and inform our users?
All the returned properties seem to be common to the entire mailbox object so perhaps exposing them under the mailbox like so Office.context.mailbox.getSharedPropertiesAsync()
would help.
Many thanks
+1
To confirm and reiterate, the issue with multi-select in a shared mailbox persists and is reproducible in all OWA clients. When more than one email is selected, Office.context.mailbox.item becomes null preventing access to the only means of retrieval of a shared mailbox identity via Office.context.mailbox.item.getSharedPropertiesAsync()
.
We need a reliable way to retrieve the properties of the current mailbox.
+1 to the suggestion above to expose the method on the mailbox
object instead of the mailbox.item
object like this:
Office.context.mailbox.getSharedPropertiesAsync()
Office.context.mailbox.item.getSharedPropertiesAsync()
PS: This is not a "feature" - it's a bug!
Is there any way to know if we are in the context of shared mailbox when having multiple items selected? On desktop outlook Office.context.mailbox.item is available we can use Office.context.mailbox.item.getSharedPropertiesAsync having shared properties I can build urls to get the details from ews using targetRestUrl from the response, and very important targetMailbox value on OWA and Desktop New Outlook Office.context.mailbox.item it's undefined. We can't tell if we are in context of shared mailbox or just standard mailbox, or if it's delegated scenario when we work in context of someone else's mailbox. Would it be possible to keep Office.context.mailbox.item have details of at one of the selected items to get the maibox details in those scenarios? Are there any plans for an API that would give us that information in multi select scenario?
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.