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

Outlook: Deeplinks to mail items returned by Outlook API no longer load #1095

Closed davidfishlock closed 3 years ago

davidfishlock commented 4 years ago

When attempting to navigate to a WebLink for a mail item returned by the Outlook API, the user receives a blank page with a spinner and 'loading' indefinitely.

Expected Behavior

The OWA read item view is displayed with the mail item

Current Behavior

The user is stuck on a blank loading screen indefinitely

Steps to Reproduce, or Live Example

Context

Your Environment

exextoc commented 4 years ago

@davidfishlock Can you also provide an example of the API that's returning that link?

The URL in the repro steps is a REST URL, rather than an OWA URL, so it should return a JSON response when called with a token via an HTTP request (see Message API).

davidfishlock commented 4 years ago

@exextoc Yes, we are calling the Outlook Rest API Version 2.0 as shown in the link you provide above.

The JSON response contains a property 'WebLink' containing a url to open the mail item in OWA. Folllowing that url now leads to a blank page with loading spinner, the item never loads.

WebLinks returned by the REST API are in the format: https://outlook.live.com/owa/?ItemID={someItemID}&exvsurl=1&viewmodel=ReadMessageItem

These urls have been loading the mail item correctly until this week.

exextoc commented 4 years ago

Thanks for the clarifications.

This repo is for Office.js questions (the web-based Office add-in platform), which does provide some access to REST (hence my confusion), but this is purely a REST question.

For REST questions, you could ask a question on Stack Overflow with the 'outlook-restapi' tag.

For this particular issue, if the URL looks correct (you mentioned it was working last week), the issue may be with OWA or with authentication (also consider whether the issue is scoped to certain users or organizations). In those cases, you could get a better response by opening a support ticket with Microsoft.

davidfishlock commented 4 years ago

@exextoc So to be clear, you have no route to escalate this internally since this will likely be breaking a large number of Outlook add-ins? It seems very poor that the best route to raise this is via stack overflow.

This affects all users, and the issue is not authentication.

exextoc commented 4 years ago

I tried to reproduce the issue initially with an organization account but unfortunately couldn't.

I'm able to reproduce the issue now but only on an outlook.com account (a "Microsoft account"). Is this consistent with what you're seeing?

davidfishlock commented 4 years ago

@exextoc Yes, the reports I have are against live.com and hotmail accounts etc

jankratochvilcz commented 4 years ago

@exextoc We'd really appreciate your help here. I've opened a support ticket with Outlook already, but so far it looks like getting an actionable will be very difficult.

Please let us know how we can make sure that this issue is seen by the OWA team as it's blocking for the release of our add-in.

exextoc commented 4 years ago

We have forwarded the information about this issue to the appropriate team, and they are now investigating this issue.

davidfishlock commented 4 years ago

@exextoc has there been any progress on this or acknowledgement of the issue? This is a showstopper for us.

Is there any way we can contact the relevant team directly?

exextoc commented 4 years ago

@davidfishlock we have fixed this bug and it should be available now. Can you check to see if it works now?

davidfishlock commented 4 years ago

@exextoc No, there doesn't appear to be any change in behaviour.

The API still returns a WebLink in this format: https://outlook.live.com/owa/?ItemID=[TheEmailID]&exvsurl=1&viewmodel=ReadMessageItem

Navigating to this redirects to: https://outlook.live.com/mail/0/deeplink?ItemID=[TheEmailID]

The mail item doesn't load, just a loading spinner as previously.

exextoc commented 4 years ago

Just to clarify, did you logout and login into your account? I was able to validate that this works for my test outlook.com account.

davidfishlock commented 4 years ago

I tested this against two accounts, one on live.com, the other on outlook.com domain.

Also tested in both Chrome and Firefox, and also in Incognito / Private browsing mode and the emails don't seem to be loading in any of these cases.

exextoc commented 4 years ago

Let me double-check the status of the fix once again.

davidfishlock commented 4 years ago

@exextoc I have attached a zip containing two .har files recorded while replicating the issue on a test account on the outlook.com domain.

network-traces.zip

The account used for this test is not containing anything other than test data, so here are the credentials that can be used to access this account if you are unable to reproduce this:

Username: jcbloggs@outlook.com Password: aZFwPgTaXu

You can log in as this user and navigate to this url to see this issue occur: https://outlook.live.com/owa/?ItemID=AQMkADAwATM3ZmYAZS0yZThjLWM3ZDAtMDACLTAwCgBGAAADo%2FuQljniOEeTKGhwsPFAXwcAYyotTmhy3kmcVKZP3bt85wAAAgEMAAAAYyotTmhy3kmcVKZP3bt85wAAAAubw%2FQAAAA%3D&exvsurl=1&viewmodel=ReadMessageItem

jankratochvilcz commented 4 years ago

@exextoc is there any update you can share with us? I can still reproduce the issue :-/

exextoc commented 4 years ago

We have forwarded that this issue still reproes to the appropriate team, and they are now investigating this issue.

cstfr commented 4 years ago

Hi, I have the same problem.

From the graphics explorer, when I click on the web link, I have "the loading screen empty indefinitely" but when I copy the text link and paste it into a browser, it works. Is URL rewriting responsible for this?

1 - From Graph explorer:

https://outlook.office365.com/mail/deeplink?ItemID=AAMkADM4YWVhNTc4LTNmZjctNDE0Zi05YTg2LWY3NTNiMWIwZDUxNABGAAAAAAA%2F0P8H%2FEVWTIdbdtNNieabBwCVFZQQzvefQq5gm6CNu7QFAAAAAAEMAACVFZQQzvefQq5gm6CNu7QFAAL%206LvfAAA%3D&exvsurl=1

2 - The copied Url:

https://outlook.office365.com/owa/?ItemID=AAMkADM4YWVhNTc4LTNmZjctNDE0Zi05YTg2LWY3NTNiMWIwZDUxNABGAAAAAAA%2F0P8H%2FEVWTIdbdtNNieabBwCVFZQQzvefQq5gm6CNu7QFAAAAAAEMAACVFZQQzvefQq5gm6CNu7QFAAL%2B6LvfAAA%3D&exvsurl=1&viewmodel=ReadMessageItem

When we submit url 2 it is rewritten in format 1. If it helps. Regards. Jean Pierre

JuaneloJuanelo commented 4 years ago

hello all, the fix is now live, can you please confirm its fixed?

davidfishlock commented 4 years ago

@JuaneloJuanelo the issue seems to be fixed when using a desktop browser. Using a mobile browser, the email doesn't load and the user ends up on the OWA homepage / inbox.

Attaching a .har file showing the loading of a deeplink on Android Chrome browser. The same link is now loading correctly on Windows 10 Chrome.

OWAMobileDeeplink.har

JuaneloJuanelo commented 4 years ago

We still have the issue in Mobile browsers, so we need to keep this open.

lindalu-MSFT commented 4 years ago

@JuaneloJuanelo THanks for letting me know! Please remove the "resolution" tag so the bot won't close it as a stale issue. I was simply doing a manual cleanup prior to FHL.

lindalu-MSFT commented 4 years ago

Removed resolution label and added under investigation. This will not be closed now! It will remain open "by design."

deyanskiq commented 4 years ago

Similar issue is happening on my side:

a webLink from the graph API (v1) is: https://outlook.live.com/owa/?itemid=AQMkADAwATNiZmYAZC0xYzFmLTAyMgBjLTAwAi0wMAoARgAAA7L%2FHGXIY1NFqCPQbmmdvaoHAHJ2OdtwdRVDo29SWY%2BMHg4AAAIBDQAAAHJ2OdtwdRVDo29SWY%2BMHg4AAADbEQ%2BSAAAA&exvsurl=1&path=/calendar/item

is redirecting to

https://outlook.live.com/calendar/0/view/month?itemid=AQMkADAwATNiZmYAZC0xYzFmLTAyMgBjLTAwAi0wMAoARgAAA7L%2FHGXIY1NFqCPQbmmdvaoHAHJ2OdtwdRVDo29SWY%2BMHg4AAAIBDQAAAHJ2OdtwdRVDo29SWY%2BMHg4AAADbEQ%2BSAAAA&exvsurl=1

and not showing the exact calendar appointment like before...

while when navigating through the calendar, the appointment url is:

https://outlook.live.com/calendar/0/item/AQMkADAwATNiZmYAZC0xYzFmLTAyMgBjLTAwAi0wMAoARgAAA7L%2FHGXIY1NFqCPQbmmdvaoHAHJ2OdtwdRVDo29SWY%2BMHg4AAAIBDQAAAHJ2OdtwdRVDo29SWY%2BMHg4AAADbEQ%2BSAAAA?itemid=AQMkADAwATNiZmYAZC0xYzFmLTAyMgBjLTAwAi0wMAoARgAAA7L%2FHGXIY1NFqCPQbmmdvaoHAHJ2OdtwdRVDo29SWY%2BMHg4AAAIBDQAAAHJ2OdtwdRVDo29SWY%2BMHg4AAADbEQ%2BSAAAA&exvsurl=1

platform: web, browser: Chrome

psantwani commented 4 years ago

+1 @deyanskiq, facing the same issue.

ChangingTerry commented 3 years ago

Still having the same issue here

Paul-Gerarts commented 3 years ago

Same here.

jankratochvilcz commented 3 years ago

@exextoc @JuaneloJuanelo Could you please comment on when could we expect the fix in production?

exextoc commented 3 years ago

Hi @deyanskiq @psantwani @ChangingTerry @Paul-Gerarts @jankratochvilcz we have made a fix for this that should be available. Could you check if this issue has been fixed?

Please make sure that the URL is unescaped ("&" needs to be "&", etc).

We are not able to reproduce this on our end anymore. We are closing this, please reopen if you still don't see it fixed.

davidfishlock commented 3 years ago

@exextoc thanks, I can confirm that the links returned by the Outlook and graph APIs appear to be working for us now.

Paul-Gerarts commented 3 years ago

@exextoc yes, thank you! Everything works as it should again

ChangingTerry commented 3 years ago

@exextoc Yes all working thanks

rohit-gandhe commented 3 years ago

Seems like this broken again? I submitted a stack question here: https://stackoverflow.com/questions/67140484/weblinks-deeplinks-to-outlook-in-ms-graph-api-not-working

rohit-gandhe commented 3 years ago

Is it just me who has this issue?

jankratochvilcz commented 3 years ago

Hi @rohit-gandhe. I've tried today and I cannot repro this on our add-in.

pshutchins commented 3 years ago

Links from mail webLink were working fine, then I changed to using immutableid and now the links are broken. They only display a spinning wheel - loading. Same problem?

exextoc commented 3 years ago

@pshutchins Can you please explain in detail how you are getting link, immutableid and how you are changing it to use immutableid? It will help us understand use-case and help us answer better.

pshutchins commented 3 years ago

Using microsoft.graph\3.31.0 and AspNetCore.App.Ref\5.0.0

In my c# code I am using the following code I found online.

Without the headeroptions message.WebLink provides a useful link, With the headeroptions message.WebLink provides broken link.

I store the link in a SQL db.

https://graph.microsoft.com/.default var headerOptions = new List() { new HeaderOption("Prefer", "IdType=\"ImmutableId\"") };

Microsoft.Graph.Message message = await graphServiceClient.Users["###@###.###"].MailFolders[FolderId] .Messages .Request(headerOptions) .AddAsync(m);

string link = message.WebLink;

link given: https://outlook.office365.com/owa/?ItemID=AAkALgAAAAAAHYQDEapmEc2byACqAC%2FEWg0ASAizQ%2BuaMkGMwntlFIJKPgAA8XHYKgAA&exvsurl=1&viewmodel=ReadMessageItem

That gets redirected and fails to load: https://outlook.office365.com/mail/deeplink?ItemID=AAkALgAAAAAAHYQDEapmEc2byACqAC%2FEWg0ASAizQ%2BuaMkGMwntlFIJKPgAA8XHYKgAA&exvsurl=1

pshutchins commented 3 years ago

Also if it will help, this is error from browser console (Microsoft Edge Version 90.0.818.56):

types.js:262 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details. createServiceFetchError.ts:12 Uncaught (in promise) Error: ResponseCode=ErrorItemNotFound, ActionSource=LoadItemReadingPane at r (createServiceFetchError.ts:12) at a (handleServerResponse…ccessAndError.ts:18) at getItemService.ts:111 at owa.MailBoot~Calenda…oot~SharedBoot.js:1 at action.js:22 at u (legacyApplyMiddleware.js:27) at t.promiseMiddleware (getSupportedFallbackForLocale.ts:26) at w (DatapointMiddleware.ts:152) at g (DatapointMiddleware.ts:97) at t.dispatchWithMiddleware (legacyApplyMiddleware.js:23) createServiceFetchError.ts:12 Uncaught (in promise) Error: ResponseCode=ErrorItemNotFound, ActionSource=LoadItemReadingPane at r (createServiceFetchError.ts:12) at a (handleServerResponse…ccessAndError.ts:18) at getItemService.ts:111 at owa.MailBoot~Calenda…oot~SharedBoot.js:1 at action.js:22 at u (legacyApplyMiddleware.js:27) at t.promiseMiddleware (getSupportedFallbackForLocale.ts:26) at w (DatapointMiddleware.ts:152) at g (DatapointMiddleware.ts:97) at t.dispatchWithMiddleware (legacyApplyMiddleware.js:23) DevTools failed to load SourceMap: Could not parse content for https://outlook.office365.com/mail/deeplink/read/owa.mailindex.js.map: Unexpected token < in JSON at position 0

exextoc commented 3 years ago

@pshutchins Thanks for your reply. Couple of more questions.

  1. Which platform are you using - Outlook Desktop, Outlook Mac, Outlook on Web or Outlook on Android/iOS?
  2. I am trying to understand which addin API is at fault here? Are you getting immutableid from some addin API which is not working as expected with some graph API?
pshutchins commented 3 years ago

As far as platform I am not sure what you are asking, I am new to this (MS Graph) so bare with me. I do appreciate any assistance.

I am using VS2019 to create a C# .Net Core ASP web application that creates a draft message in a particular folder within our organization's Exchange Online account. Using microsoft.graph 3.31.0 on the server. This is a daemon application.

When it creates the message it returns a Microsoft.Graph.Message with the Id and WebLink. I put the WebLink on a web page for user to click.

When the link works it uses OWA. Our organization does use Outlook Desktop, I have it installed. Even when the link does not work, the message is created properly and can be accessed from my Outlook Desktop.

exextoc commented 3 years ago

@pshutchins Are you using any Outlook Addins APIs which is not working for you as expected? Which API is that?

https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/apis

pshutchins commented 3 years ago

I am not aware of any AddIns being used in OWA.

exextoc commented 3 years ago

@pshutchins In that case, most likely it is not the same issue. This GitHub project and issue are related to OfficeJS APIs (addins apis). You may want to reach out to other GitHub project (probably Microsoft Graph APIs?) and file a new issue.

Thanks for your understanding.

pshutchins commented 3 years ago

thanks

davidfishlock commented 3 years ago

@exextoc it appears that deeplinks on mobile OWA are broken again. In all cases the weblinks returned by Outlook REST API or graph appear to load the inbox.

boehmmic commented 2 years ago

Hello @exextoc could you open the issue again? It still / again only leads to a blank page when opening the event detail link via API on mobile devices.

nitingupta2012 commented 2 years ago

Hi @exextoc

We are also facing the same issue. Using graph API via power automate to generate emails and user can view the emails via weblink provided by API.

For some users the link is working fine and users are able to view the email and can edit the email via deeplink but for other set of users they are unable to edit the email hence can't send it.

Strange behavior's for users in same org with same licensing and access permissions.

Can we open this issue again?

benduongquangmobile commented 1 year ago

@exextoc i am also facing that issue on android. the webLink from ms-api is returning https://outlook.office365.com/owa/?ItemID=AAMkADM5ZjkzNzZlLTM5ZmItNGUyZC05ZWFmLWUzYWEwYjRiM2ZhMQBGAAAAAAAQCeGSFScaQZZls4hxbrKLBwDDCN0Te6LzTJxQuo4l3AQKAAAAAAEMAADDCN0Te6LzTJxQuo4l3AQKAABZXM4PAAA%3D. And when it is opening on browser, it turns into this link https://outlook.office365.com/mail/jsmvvmdeeplink/?ItemID=AAMkADM5ZjkzNzZlLTM5ZmItNGUyZC05ZWFmLWUzYWEwYjRiM2ZhMQBGAAAAAAAQCeGSFScaQZZls4hxbrKLBwDDCN0Te6LzTJxQuo4l3AQKAAAAAAEMAADDCN0Te6LzTJxQuo4l3AQKAABZXM4XAAA%3D&exvsurl=1&viewmodel=ReadMessageItem&bO=4 and failed to load. Please help to check. Thank you so much!!

Frank-Bresz-EY commented 1 year ago

Also seeing this - it was working up until a few months ago, now broken, have tried many things. FAIL