jgraph / drawio

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

OneDrive for Business #8

Closed awendland closed 6 years ago

awendland commented 7 years ago

First off, thanks for making such a wonderful application! It's been such a great tool for throwing ideas together over the past couple of years.

I've recently switched from using Google Drive, which worked flawlessly with this awesome app, over to OneDrive for Business, where I am now running into some problems. Fundamentally, I think the problem is on Microsoft's end with their mess of Azure AD vs. personal accounts. However, until they get that fixed it's thrown onto the app developers to handle the mayhem.

To help on that end, I was taking a look at war/js/diagramly/OneDriveClient.js#L171 and it appears that Draw.io currently uses the OneDrive Authentication and Sign-in for personal accounts. To support business accounts, it looks like a couple changes/additions would need to be made:

  1. Register Draw.io with OneDrive for Business
  2. Add an option to go through a similar OAuth flow to the current OneDrive support, but with a changed set of base URLs that are set up for business accounts. As far as I can tell, this shouldn't be all that different than the personal account login flow (I think it's exactly the same besides the different URLs).

I don't think there are any other discrepancies between account types besides login.

Thanks again for making this sweet tool!

davidjgraph commented 7 years ago

The story here is we tried the registration process for OneDrive for Business and after about 4 hours just gave up. It's simply horrific. Maybe we could find one of the OneDrive team to guide us, but otherwise we'll try to make time (and hope they just improve it in the meantime).

rgregg commented 7 years ago

@davidjgraph Sorry you had so much trouble with getting auth for ODB working. Were you using the new https://apps.dev.microsoft.com experience? Shoot me a message and I'll be happy to work with your team to get draw.io working with ODB in addition to ODC.

davidjgraph commented 7 years ago

@rgregg Thanks Ryan for getting in touch. I tried https://dev.onedrive.com/auth/aad_oauth.htm#register-your-app-with-azure-active-directory last time (it was some time ago). I guess https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview/ is what I should be reading first? Thanks.

davidjgraph commented 7 years ago

We track votes on feature requests at uservoice, Github to more for development issues. It's better to vote there to raise the priority. This is the relevant item to vote on.

keunes commented 7 years ago

Hi all, I gave my support over at Uservoice. Just wanted to chip in here to say that I can log in to OneDrive Business, add Draw.io as an app and give it all needed permissions. It is a problem when it starts asking for authorisation after I have selected the folder (?)

davidjgraph commented 7 years ago

Under help->about what version are you seeing?

keunes commented 7 years ago

Which help? Of Draw.io? In the web-interface I see 6.7.11

davidjgraph commented 7 years ago

Yes. It's 6.8.0 you need for OneDrive for Business accounts to work, you need a refresh.

keunes commented 7 years ago

Awesome. Did you just update it? 'cause I just opened draw.io this afternoon :) Thanks in any case! 👍 :)

davidjgraph commented 7 years ago

Yes, the release was about 45 minutes ago, good timing :).

von-taylor-avalara commented 7 years ago

works great for me as well - thanks for the support!

dudicp commented 7 years ago

It seems to work on files located in the employee personal folders but not on files found under company folders. I'm being able to select the file from the browse dialog but when selecting the file and clicking on 'open', I'm getting the following error: "The resource could not be found."

KazuyDarklight commented 7 years ago

Ditto, if I save to my own individual storage under OneDrive for Business then everything is fine, but while I can navigate to and see the files and folders of the SharePoint OneDrive for Business storage areas that I have access to with no problem, if I actually try to open any file or save a new file to one of the folders then I get "The Resource could not be found."

alderg commented 7 years ago

We're using the latest version of the graph API (v1.0) and the picker (v7.2). They don't seem to support SharePoint OneDrive for Business storage.

ronvanpol commented 6 years ago

I too can't seem to open or save files with ODB. I am able to authenticate and browse through company files, but opening them as well as saving files to the company folders result in an error message. Would love to see it fixed

momamene commented 6 years ago

It seems that the problem is not solved currently. This issue needs to be reopened.

JohnBloom commented 6 years ago

I just found this thread after trying for hours to get OneDrive to work for diagrams shared by multiple people. We have a requirement to use OneDrive for company diagrams and I have been trying to use a central place in OneDrive to save the files. I was able to create a sharepoint group that I can access for draw.io but when I try to open the files in the group it says "The resource could not be found."

Does anyone have a workaround? My current workaround is to have people copy the files to their own OneDrive and make changes and then copy them back. Its not great but it will work for now.

mechanic22 commented 6 years ago

I can conform we are having the same issue. Also the "Shared with me" from One Drive doesn't show up in open from one drive. We tried copying and pasting into the open from URL and that should the "The resource could not be found" error.

jadz commented 6 years ago

I can also confirm this issue exists when the document is stored within a Sharepoint group.

Personal OneDrive works flawlessly.

davidjgraph commented 6 years ago

Trello thread for sharepoint specific part at https://trello.com/c/HjxEcmYb/283-add-onedrive-for-business-on-sharepoint-support. I'll close this since the OneDrive for Business part is implemented, it's the sharepoint part that isn't.

davidjgraph commented 5 years ago

Sharepoint integration fixed in 9.2.9

BobVul commented 4 years ago

Is the issue @mechanic22 mentioned fixed? I can't see files "shared with me" via business onedrive/sharepoint, so the only way to open those files is to download and upload to draw.io...

davidjgraph commented 4 years ago

This issue is primarily to track OneDrive for Business Online and Sharepoint integration. That is implemented at a high level so the issue is marked as closed.

If there is a problem with a particular domain, please post details to https://groups.google.com/forum/#!forum/drawio

crisher0219 commented 4 years ago

So, one way around this, while not ideal, is to sync your ODB to your local machine. Then, use the device option within Draw.io, but simply select the ODB synced folders at that point.

davidjgraph commented 4 years ago

Again, this issue tracks a feature request, that request is implemented. If you have an additional issue relating to a bug, please post a new issue with reproduction steps.