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

Office outlook ItemId and get getSharedPropertiesAsync bug #4781

Closed SE-Hubert closed 1 month ago

SE-Hubert commented 2 months ago

Provide required information needed to triage your issue

Your Environment

Expected behavior

When trying to get the itemId in compose mode. We save the message and as an callback result we have the itemId:

                Office.context.mailbox.item.saveAsync(async (result) => {
                    const itemId = result.value;
                });

For the getSharedPropertiesAsync, we call the function and we should get the shared properties of a given shared mailbox if the function is defined.

Current behavior

For the itemId currently in the desktop version of outlook the first time we save the compose message, the itemId is like so: "clientId:(guid)". And the second time we will call it would resemble a normal itemId: "AAMkAGFjZjI3MTFiLThiZDctNGMyZS05YjI3LWFjOGNmYjcxZWQzOABGAAAAAABRMWgXD0utQLNDsO/0Fe5IBwCcsJP4/6D0Q6oczvczNWVUAAAAAAEPAACcsJP4/6D0Q6odzvczNWVUAAJMlQ00AAA=" So in my case I always have to get/save the itemId 2 times before I get the actual value.

For the getSharedPropertiesAsync, when called with a callback, the callback never gets called. When debugging I found that the api call might be the issue, here is the error message that I found in the console: "Access to XMLHttpRequest at 'https://outlook.office365.com/autodiscover/autodiscover.json/v1.0/shared@secureexchanges.onmicrosoft.com?Protocol=REST' from origin 'https://outlook.office.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

Steps to reproduce

  1. Simply do an office add-in that supports sharedFolders in the xml
  2. Then try to get the item id of a compose message by saving it
  3. Add a shared mailbox and try to getSharedPropertiesAsync with a callback only

Useful logs

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

sivachandran-msft commented 2 months ago

Hi @SE-Hubert , thanks for sharing your query.

This is a known issue with clientID and our team is actively work on the fix. The fix will be available in sometime. We will update the post once it is in PROD.

SE-Hubert commented 2 months ago

Great to know thanks!

manaunl commented 2 months ago

Our customers are experiencing similar issues. It would be greatly appreciated if this fix could be prioritized. Thank you in advance for your attention to this matter.

sivachandran-msft commented 2 months ago

@manaunl Fix is already in action and will share the update once it reached complete PROD.

manaunl commented 2 months ago

Hi @sivachandran-msft,

Could you please provide an estimated timeline for when the fix will be fully rolled out to production? Additionally, is there any workaround that we can implement in the meantime to mitigate the impact on our customers?

Thank you!

sivachandran-msft commented 2 months ago

Hi @manaunl , there are 2 observations reported in this issue.

  1. The clientID retrieved is having different value before & after saving - The team has already fixed this and it will be available in few weeks.
  2. The second observations related to CORS, the team is analysing this and currently we cannot share the expected timeline for this.
manaunl commented 2 months ago

Hi @sivachandran-msft

Thank you for quick response. Our primary concern is the CORS-related issue, as it's impacting our customers. We understand that the team is still analyzing it, but if there are any temporary workarounds or steps we can take in the meantime, that would be extremely helpful.

andymozza commented 2 months ago

Also critical customer issue here for us. This was working and taken down by a recent change it seems. This should have priority please to restore what was working.

geoffreyreemer commented 2 months ago

Adding another vote to the mix. Unfortunately, the issue hinders our customers who use shared mailboxes from interacting with secure emails in their mailboxes, which greatly impacts their productivity. If a recent change caused this, would you consider reverting that change? @sivachandran-msft ?

DustinBrungart commented 2 months ago

This is a critical issue to our customer base who are experiencing a significant loss of functionality and would like to remain updated on its timely resolution.

anjalitp commented 2 months ago

Our team is actively working on fixing the CORS related issue and we will update this thread once fix is available.

SwatidPathak commented 1 month ago

Office outlook ItemId and get getSharedPropertiesAsync bug

4781

Following up on this issue. Is the fix in Prod yet? Our processes are impacted heavily due to this.

rajjha-msft commented 1 month ago

The issue has been fixed and deployed. Please let us know if you still see the issue.

sumitjain-rsi commented 1 month ago

in our case on browser, cors and unauthorized error is now not coming. but method is still not executing. Office.context.mailbox.item.getSharedPropertiesAsync({}, function (result2) {}); image

DC-de-Villiers commented 1 month ago

The cors issue seems to be resolved, but the callback is still not being executed.

DanielSchwabeDocuware commented 1 month ago

same for us. Callback is not executing

SE-Hubert commented 1 month ago

Same here

andymozza commented 1 month ago

Hi, this is not fixed. Callback is still not working.

geoffreyreemer commented 1 month ago

Not fixed for us either, unfortunately. Critical issue still remains.

ChibaniMohamed commented 1 month ago

Not Fixed

mobisw-msft commented 1 month ago

Hey everyone,

We are working on this issue and we will keep this thread posted.

geoffreyreemer commented 1 month ago

@mobisw-msft Hey. Thanks for the update and your continuous efforts. Just wanted to mention that perhaps it's good to remove the Status: fixed label for this issue, since the deployed release didn't actually fix the issue.

Any timelines we can communicate to our customers about this?

Thank you. 👍

wklikli commented 1 month ago

@mobisw-msft We could all do with an update on this issue. It is painful for our customer base(s) and apart from providing a failed fix, very limited progress has been made. Thanks in advance for providing more clarity.

wklikli commented 1 month ago

@exextoc perhaps some update from your end?

wklikli commented 1 month ago

@mobisw-msft @exextoc Please provide an update.

wklikli commented 1 month ago

Hey everyone,

We are working on this issue and we will keep this thread posted.

It would be awesome if you could indeed "keep this thread posted".

geoffreyreemer commented 1 month ago

@exextoc Hey. Just wanted to second the request for a prognosis on this one. As mentioned previously, quite a few customers of ours are affected, which hinders their ability to perform their workflows. It's important for us to understand whether a fix is expected in the short term. If the answer is that it's not possible to fix this in the short term, we have to determine next steps to minimize the impact on our customers.

Thank you and good luck!

AlonEkelund commented 1 month ago

Any update? Any recommendations on what we can do? this is highly critical for us and our customers. Please advice

exextoc commented 1 month ago

Fix for this is rolled out, it can be tested by. Office.context.mailbox.item.getSharedPropertiesAsync(function(result) { console.log(JSON.stringify(result)); });

geoffreyreemer commented 1 month ago

@exextoc Thank you so much! I've done some preliminary testing and it seems to work well now. Appreciate you getting back to us in your weekend. 👍

sumitjain-rsi commented 1 month ago

for us it still not working on browser and starts giving cors error image

AlonEkelund commented 1 month ago

We are still getting reports from customers that they still have the problem. In our own production in the New Outlook Client, it works. However, customers using web mail still have the problem.

AlonEkelund commented 1 month ago

We contacted the customers that still had the problem in web mail. After deleting the browser cache all is working. We are still doing some testing. But it seems to be working again. :-)

Thank you very much guys.

sumitjain-rsi commented 1 month ago

for us it still not working on browser and starts giving cors error image

it seems to be working after clearing cache.

alex-fitzgerald commented 1 month ago

Great work @exextoc et al!

wklikli commented 1 month ago

Many thanks indeed. Going forward though, it would be massively appreciated if the comms can be more open. We have to manage customer and roadmap impact, which is extremely difficult to do if there is no information. Thanks!