Adding OneDrive to CtrlShare#

This guide shows how to configure Microsoft OneDrive for your CtrlShare instllation.

  1. Open M-Files Admin

  2. Find and connect to your M-Files server

  3. Open the target vault and select the Configurations menu

  4. Select the Other Applications section and click on CtrlShare

  5. Then select the Configuration tab

  6. Create a new DriveConfiguration

Configuration of OneDrive in CtrlShare

  1. For OneDrive for Business, please add the following values:

    1. drive_type should be set to ONE_DRIVE_BUSINESS

    2. client_id should be set to the Application (client) ID from your Azure AD app registration

    3. client_secret should be set to the Application Secret from your Azure AD app registration

    4. redirect_uri should be set to

  2. Before continuing, please open a browser window and log in to Microsoft Office online via, for instance,

    1. Please note that the account that you log in as now will be used for storing OneDrive files for all users using CtrlShare via M-Files

  3. Now that you are logged in, please insert your Application (client) ID in this URL where it says APPLICATIONID:


  4. Paste the modified link with your application id into the same browser and hit enter. A page asking for permissions should now appear. Simply hit Accept.

Permissions required for CtrlShare

  1. Upon accepting the permissions, you should now see a blank page. Copy the URL from the address bar somewhere to reveal the code portion. It should look something like this:

    1. In other words, copy the code portion of the URL after code= until, and not including &session_state

  2. Paste the code into authorization_code in the drive configuration and then save the configuration.

  3. If all has gone well, you should not see any errors upon saving.