Connect ownCloud to OneDrive: A Complete Integration Guide
In this article
Yes, you can connect ownCloud to OneDrive by using the "External Storage Support" app within the ownCloud server environment. This integration allows you to access and manage your OneDrive files directly from the ownCloud interface without needing to move the files physically from Microsoft's servers to your own hardware. Note that labels and menu paths may vary slightly depending on your ownCloud version, server distribution, or region.
What You'll Need
- An active ownCloud server installation with administrator privileges.
- A Microsoft account with an active OneDrive subscription.
- The "External Storage Support" app enabled on your ownCloud server.
- Access to the Microsoft Azure portal to create an application registration for API access.
Step-by-Step
- Enable External Storage Support: Log into your ownCloud instance as an administrator. Navigate to the Apps section and search for "External Storage Support." If it is not already enabled, click the enable button.
- Register an App in Microsoft Azure: To allow ownCloud to talk to OneDrive, you must create a bridge. Log into the Azure Portal. Navigate to App Registrations and select New Registration. Give the app a name (e.g., "ownCloud Integration"), set the account type to "Accounts in any organizational directory and personal Microsoft accounts," and set the Redirect URI to the specific callback URL provided in your ownCloud external storage settings page.
- Gather API Credentials: Once the app is registered in Azure, copy the Application (client) ID. Then, navigate to the Certificates & Secrets section, create a new client secret, and immediately copy the Value of that secret. You will not be able to see this value again once you leave the page.
- Configure OneDrive in ownCloud: In your ownCloud interface, go to Settings and select the Administrative section. Find the External Storages tab. From the dropdown menu of storage types, select "OneDrive."
- Enter Connection Details: Create a folder name for your OneDrive files to appear in. Enter the Client ID and Client Secret you obtained from the Azure portal.
- Authenticate the Account: Click the button to authenticate or "Grant Access." This will redirect you to a Microsoft login page. Sign in with your OneDrive credentials and accept the permissions request to allow ownCloud to access your files.
- Verify the Connection: Once the green checkmark appears in the External Storages list, return to your ownCloud Files view. You should now see a folder with the name you chose, containing your OneDrive directory.
Common Mistakes
- Incorrect Redirect URI: The most common failure occurs when the Redirect URI in the Azure portal does not exactly match the URL provided by ownCloud. Even a missing trailing slash can cause an authentication error.
- Using the Secret ID instead of the Value: In the Azure portal, there is a "Secret ID" and a "Value." You must use the Value; the Secret ID will not work for authentication.
- Insufficient Permissions: Failing to select "Personal Microsoft accounts" during the Azure app registration will prevent individual users from connecting their accounts.
Tips
- Limit Access: If you are an administrator setting this up for other users, you can choose whether to enable OneDrive for all users or only for specific groups to maintain better security control.
- Folder Naming: Use a clear, distinct name for the OneDrive external folder (e.g., "MS_OneDrive") so you can easily distinguish between files stored locally on your server and those stored in the cloud.
- Regular Secret Rotation: For higher security, rotate your Azure client secrets periodically and update them in the ownCloud settings.
Troubleshooting
If the connection fails or the folder appears empty, try these steps in order:
- Refresh the Session: Sign out of both ownCloud and your Microsoft account, clear your browser cache, and attempt the authentication process again.
- Check App Status: Ensure the External Storage Support app is still enabled and has not been disabled during a server update.
- Verify Azure Credentials: Double-check that the Client ID and Client Secret are entered correctly without any leading or trailing spaces.
- Review Azure Permissions: Ensure the app registration in Azure has the necessary "Files.ReadWrite.All" or similar API permissions granted.
Frequently Asked Questions
Does this move my files from OneDrive to ownCloud?
No. The files remain on Microsoft's servers. ownCloud simply acts as a window or interface to view and edit those files.
Can I use this for a business OneDrive account?
Yes, provided you have the necessary administrative permissions in your organization's Azure Active Directory to register an application.
Will deleting a file in ownCloud delete it in OneDrive?
Yes. Because this is a live connection, any changes, edits, or deletions made through the ownCloud interface are reflected in the actual OneDrive storage.
Does this slow down my ownCloud server?
Generally, no. However, loading very large directories from an external cloud provider may be slightly slower than loading files from local server disks.
Is it possible to sync OneDrive to a local folder first?
While you can do this using the OneDrive desktop client, using the External Storage Support app is the recommended method for server-to-cloud integration without requiring a desktop OS.