jgraph / drawio

draw.io is a JavaScript, client-side editor for general diagramming.
https://www.drawio.com
Other
41.33k stars 7.66k forks source link

Unable to open drawing shared via OneDrive for Business #3758

Open Zxurian opened 1 year ago

Zxurian commented 1 year ago

Preflight Checklist

Describe the bug Sharing a drawing within OneDrive for Business to another user does not allow that user to open the shared drawing.

To Reproduce Steps to reproduce the behavior:

  1. Within drawing, click "Share" button in top right. image
  2. This redirects to a OneDrive file placeholder url.
  3. Click Share button within OneDrive image
  4. Enter user to share with
  5. User 2 gets normal "<User 1> has shared a file with you"
  6. User 2 clicks "Open" within share email
  7. They are brought to the same OneDrive file placeholder url.
  8. Open new tab and go directly to https://app.diagrams.net
  9. Select "Open Existing Diagram"
  10. Select "Shared" option. The file that User 1 shared with User 2 is shown as available image
  11. Click "Open"
  12. Get error that file was not found. image

Expected behavior Should be able to open the shared drawing

Screenshots inline above with steps

draw.io version (In the Help->About menu of the draw.io editor):

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context Searching beforehand showed a possible link to #3755 however it's not quite the same since all the URLs work, the drawing just can't be opened.

DavidPIsaac commented 1 year ago

Same issue. I have tried every conceivable path, including exporting and opening the URL (file > export as > url; file > open from > url). The best I can achieve is the user can open a read-only copy even though they have read-write access to the file in OneDrive. I expected the shared folder/file to be visible from the open dialog (file > open from > OneDrive > shared).

cveld commented 1 year ago

Not sure if my scenario applies to this issue:

I am added as guest to another tenant. With drawio I am only able to access the files in my primary tenant. Ideally I would like to be able to work with drawio files on SharePoint anywhere, regardsless if it it my primary tenant, or I am added as guest.

sune-ku commented 1 year ago

I also encountered this issue with shared drawings, but have discovered that if you double click on the file name, rather than clicking "Open" it does work correctly and allows for collaboration.

Clicking "Open" while having the file selected results in the Error message shown in the post from @Zxurian

Floriszz commented 1 year ago

For some reason I don't have this problem in the Edge browser with my primary profile. But when I open incognito and/or Chrome, I get the same problem. The thumbnail of the .draw.io file is not shown either. Also it does not matter if the file is in my Onedrive or in SharePoint. Double click as @sune-ku mentions, does not work for me. Nothing happens after double click. I tried with click on the ' Sign out' button on the popup where you can choose to Open a file from Onedrive or create a new file. After signing out, you have to sign back in with the new Multifactor authentication where you have to type in the 2 digits on your mobile device(Microsoft Authenticator app). It looks like the problems started after this new authentication was introduced. image image

davidjgraph commented 1 year ago

What are the draw.io versions in use in chrome and edge?

Floriszz commented 1 year ago

@davidjgraph, it is from app.diagrams.net website in the browser. I don't see where the user can choose a specific version. Click on help shows v22.0.2.

Floriszz commented 1 year ago

Today, I tested on different internet connections(5G-Mobile, Wifi guest, LAN Home, LAN corporate, Wifi Enterprise Radius Windows login) and different Draw.IO apps; Edge, Chrome, Edge PWA(Progressive Web App). And all worked fine! All draw.io files on different Onedrive Business locations could be opened, except when using Incognito webbrowser in Microsoft Edge.(Incognito in Chrome worked fine) Really frustrating this issue is not consistency to reproduce.

Floriszz commented 1 year ago

F12 screenshot if of any help; image

Error message in text;

{error: {code: "accessDenied", innerError: {code: "conditionalAccessPolicyEnforced"},…}} error : {code: "accessDenied", innerError: {code: "conditionalAccessPolicyEnforced"},…} code: "accessDenied" innerError : {code: "conditionalAccessPolicyEnforced"} code : "conditionalAccessPolicyEnforced" message: "Due to organizational policies, you can't download these resources from this device."

davidjgraph commented 1 year ago

Thanks for the additional research. It sounds like there's some restriction on your O365 org account. Do you know who the admin is to ask them?

Zxurian commented 1 year ago

I am an admin on our O365 org account, issue is still happening. image

Just tried going into draw.io directly from the new user account, then authorizing, then clicking on "Shared" from the left, while the shared document does appear on the right, and correctly shows a preview, I am presented with an error if I try to open it. image image

Floriszz commented 1 year ago

Thanks for the additional research. It sounds like there's some restriction on your O365 org account. Do you know who the admin is to ask them?

Yes, we are trying to find out which policy is the one. Will update when found

Zxurian commented 5 months ago

Revisiting this as it's still an issue.

Per #4228 I understand that you can't open the file directly from OneDrive, however from within draw.io The file still can't be found to open anywhere. however the ability to open shared diagrams still does not work. the symptoms are the same as described previously above. https://github.com/jgraph/drawio/issues/3758#issuecomment-1749511857

I was able to take the direct url of the open document ( https://app.diagrams.net/#... ) and paste directly into the URL bar of the new user while they were signed into Office with that account, and it opened fine. However the existing issue of not being able to Open the shared document from draw.io's own interface still remained, and remains a high amount of user friction when trying to share draw.io documents between users.

teohsinyee commented 5 months ago

I also encountered this issue with shared drawings, but have discovered that if you double click on the file name, rather than clicking "Open" it does work correctly and allows for collaboration.

Clicking "Open" while having the file selected results in the Error message shown in the post from @Zxurian

I am still encountering the issue. But double click on the file name worked.