How to Create and Configure Microsoft OneDrive


To use the ownCloud OneDrive app, you mandatory need consulting first. Contact to get access to. When granted, follow this guide to use Microsoft OneDrive as an external storage option in ownCloud.

Note that Microsoft has updated and renamed the link to its portal and Application Registration Portal as shown in the screenshots below has been renamed to Azure Portal.

Create an Application Configuration

Register a new OneDrive application.

To create a new application:

With the application created, you can then add a range of further settings. However, only a few of them are required for use with ownCloud.

Application Password

Set the application’s name.

Under Application Secrets, click Generate New Password, which generates a password and displays it in a popup window. It is required later during when configuring a mount point.

Copy the password to your preferred password manager, as it is only displayed once.

Redirect URLs

Under menu:[Platforms], click Add Platform and choose Web in the popup window which appears. Only one redirect URL field is visible at first, so click Add URL to add another one.

With two fields available, add two redirect URLs; one for settings/admin and one for settings/personal, as you can see in the image below.

Set the redirect URLs.

Application Permissions

Open the application permissions dialog.

Under "Microsoft Graph Permissions", click "Add" next to "Application Permissions". This opens a popup window where you can choose the required permissions. Add at least the following four:

  • Files.Read.All

  • Files.ReadWrite.All

  • IdentityRiskEvent.Read.All

  • User.Read.All

With those settings added, click "Save", located right at the bottom of the page.

Configure a Mount Point in ownCloud

You can add as many OneDrive mount points as you want. To do so:

  1. Add a new storage, selecting "One Drive" for external storage.

  2. Set the credentials of your OneDrive application, and then accept the permissions.

  3. If everything is accepted, the mount points should appear, with a green status icon on the far left-hand side.

OneDrive mount points configuration

To be able to use the occ command files_onedrive:subscribe, you need to have the variable overwrite.cli.url set in config/config.php, as in this example:

'overwrite.cli.url' => '',

The HTTPS prefix, port, and /index.php suffix are mandatory.