Closed plamenbotev closed 2 years ago
Shared mailboxes are not supported at this time, we only support Shared Folders/Delegate scenarios. An overview of what is not supported can be found here And if you're interested in enabling Delegate Scenarios in an Outlook add-in, documentation can be found here. One thing to note is that in a delegate scenario, you can't use EWS with the tokens currently provided by office.js API.
Hello and thank you for your reply. If I understood correctly shared folders should be accessible using EWS? Currently what I have tested is to create a shared mailbox in a development tenant. The mailbox appeared automatically in my web and desktop clients. I loaded my addin in the context of the shared mailbox and executed successfully EWS requests with token obtained from the office.js API.
I will double check the documentation, that you have shared, but is my assumption correct, that the request is not guarantied to work properly in the future for the context that I have used it?
@plamenbotev As the documentation said, we do not support EWS for shared mailbox and therefore we don't guarantee the result for it.
@exextoc Thank you for your answer. Another question regarding the supported setups with the graph services, will they be working properly on hybrid setups? This is actually the main reason for me to test the EWS as a backup and fallback if the graph calls error out. We are trying to make our product backward compatible as much as possible after the discontinuation of the Outlook REST services in November.
@plamenbotev Yes, it works in 365 and in preview for on-premises. You can find more detail in link below: https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/delegate-access?tabs=windows
Hello again @exextoc and thank you for answering my questions. I got the impression that Graph will not be working properly at some point for mailboxes that are on-prem in hybrid setups: https://techcommunity.microsoft.com/t5/exchange-team-blog/the-end-of-the-rest-api-for-on-premises-mailboxes-preview/ba-p/3221219
But perhaps I interpreted that incorrectly?
A follow up question from me too.
From what I gather from this discussion and the links provided:
EWS:
Graph API:
Is any of my statements incorrect?
Also, does any API support shared mailboxes at all?
Thanks in advance!
Hello,
We are testing the EWS services to get additional information for the messages in a shared mailbox and we see no issues. All tested operations so far are working as expected. However I have noticed in the documentation, that EWS are not supported for shared maiboxes: https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/delegate-access?tabs=windows#rest-and-ews
Is it safe for us to use the EWS services in that scenario?
@plamenbotev when you say that you are testing EWS services to get additional information for the messages in a shared mailbox with no issues, what specifically you mean? how are you testing this? EWS calls are blocked in Outlook Add-ins when they are activated in a shared folder or mailbox context, to be very precise you cannot use the Office.js makeEwsRequestAsync method in such conditions, that's why I am curious to learn what you mean by "its working with no issues" I am assuming you are using raw EWS wihtout Office.js, which is an option.
To add more details. This snippet (import with Script lab) will fail with an "API not supported for shared folders." error, when executed from an add-in activated in a shared folder or mailbox.
A follow up question from me too.
From what I gather from this discussion and the links provided:
EWS:
- works in hybrid and cloud
- works for shared folders
- does not work for shared mailboxes
Graph API:
- works in hybrid and cloud at the moment
- works for shared folders and shared mailboxes (in preview) for both cloud and hybrid
- according to this article, Graph API will stop working for hybrid environments in 2023 and EWS must be used
Is any of my statements incorrect?
Also, does any API support shared mailboxes at all?
Thanks in advance!
@ivaylomitrev i think we need to differentiate an important aspect here. which is Calling EWS using Office.js vs Calling EWS without Office.js.
and i would add: what is in preview right now (but we are working on and will be available soon) is Outlook Add-in Activation in Shared Mailbox, in OWA. We do have support for it in Win32.
Hope this clarifies.
@JuaneloJuanelo Hello and thank you for taking the time to look into our questions.
I have done the following steps to get information via EWS for mail sent to shared mailbox:
I have executed the following code in the browser console directly for the test:
https://gist.github.com/plamenbotev/696e789129837deec299962a4193172c
The above code returns response successfully and has the shape below:
Object { status: "succeeded", value: "..." }
However if the above snippet should not work, should I be able to execute the same request from our backend using token obtained from Office.context.mailbox.getCallbackTokenAsync
and sent against Office.context.mailbox.ewsUrl
?
Thanks in advance
@JuaneloJuanelo Hello and thank you for taking the time to look into our questions.
I have done the following steps to get information via EWS for mail sent to shared mailbox:
- Created shared mailbox in the exchange admin center using development tenant
- In delegation tab for the newly created shared mailbox added my mail in Read and manage (Full Access)
- In my web outlook client I have added the shared mailbox mail as new shared folder
I have executed the following code in the browser console directly for the test:
https://gist.github.com/plamenbotev/696e789129837deec299962a4193172c
The above code returns response successfully and has the shape below:
Object { status: "succeeded", value: "..." }
However if the above snippet should not work, should I be able to execute the same request from our backend using token obtained from
Office.context.mailbox.getCallbackTokenAsync
and sent againstOffice.context.mailbox.ewsUrl
?Thanks in advance
@plamenbotev Thanks for sending this detailed description. I am able to repro your behavior in Outlook for the Web. The behavior is inconsistent with the Win32 Outlook client where EWS calls are not allowed neither on delegates nor in shared mailboxes. This is a platform disparity issue and I am able to repro those. That been said, shared mailboxes is not officially supported yet in OWA, so this might be blocked in the future. We need to have a couple of discussions on the team to see how we will solve this.
I guess the main outcome of all this thread is 2 things:
Nothing further to add on this thread. We ahve a follow up on adjusting this functionality upon support of shared mailboxes in OWA.
@JuaneloJuanelo Yes, I think that we have a clear idea how to proceed. Thank you. :)
Hello,
We are testing the EWS services to get additional information for the messages in a shared mailbox and we see no issues. All tested operations so far are working as expected. However I have noticed in the documentation, that EWS are not supported for shared maiboxes: https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/delegate-access?tabs=windows#rest-and-ews
Is it safe for us to use the EWS services in that scenario?