Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access shared folders in OneDrive for Business #290

Open
tobihagemann opened this issue Dec 23, 2022 · 0 comments
Open

Access shared folders in OneDrive for Business #290

tobihagemann opened this issue Dec 23, 2022 · 0 comments
Labels

Comments

@tobihagemann
Copy link
Member

Original issue from the old app: cryptomator/cryptomator-ios#139

Status Quo

OneDrive (personal account): You can access shared folders. If you're unable to access a shared folder that was shared with you (i.e., you are not the owner), you have to add the shared folder to your OneDrive.

OneDrive for Business (work/school account): You can only access shared folders that you own. Even if you add a shortcut to "My Files", you cannot access the shared folder.

Technical Details

To make this point clear: Shortcuts are not part of the directory listing. It seems that there is no way to implement this feature transparently. So there is no way to "merge" shared files with your own files. That's actually what the shortcuts are for (in my opinion) but they're missing.

There is an API to list all shared items (not being the owner) via GET /me/drive/sharedWithMe. With these identifiers, you can access the shared folders.

Proposed Solution

Since personal accounts are not affected by this issue, the driveType should be retrieved and persisted after a successful authentication. You can get it via GET /me/drive.

When adding a vault in OneDrive: If the driveType is business (and maybe documentLibrary?!), we need to present a choice between the user's own files and shared items. An optimization could be to detect if there are any shared items at all so that the choice can be skipped. In case of shared items, we need a new screen that lists all available shared folders (shared files don't make any sense here). If one of the folder is selected, the "new" root identifier is the one from the selection (incl. drive identifier).

Caveat: If we set the selected folder as root, there will be the problem that the root folder doesn't have a name (classic example if the vault is the root folder itself). When implementing this feature, we should experiment with setting the parent reference as root but still showing the shared folder directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant