Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.
Version: 1.18.1

OneDrive Storage Provider Setup

The OneDrive Storage Provider allows end-users to map in their OneDrive storage into container-based sessions. Access is provided via Microsoft's OAuth interface using the Rclone Docker volume plugin.

Reference Docs:

Creating a Microsoft OAuth App

  1. Login to the Microsoft Azure Portal: https://portal.azure.com//
  2. Select Azure Active Directory.

Azure AD Control Panel

Azure AD Control Panel
  1. Select App Registrations.

App Registrations

App Registrations
  1. Select New Registration.
  2. Give the app a Name (e.g Kasm OneDrive Example).
  3. In the Supported account types select Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
  4. In the Redirect URI, select Web, then enter the following URL , substituting the hostname of the Kasm deployment https://kasm.example.com/api/cloud_storage_callback
warning

In this example, we walk through creating an integration where any Microsoft user can auth with the Kasm app. This is ideal for a public facing deployment. Other options are available for single-tenant and multi-tenant configurations.

Register an App

Register an App
  1. On the next page, the Application (client) ID is shown, save this value as the Client ID to be used in the next section.
  2. Select Add a certificate or secret next to Client credentials.

Client Credentials

Client Credentials
  1. Select the Client secrets tab, then slick New client secret.
  2. Enter a description and expiration then click Add.
  3. The credentials are shown, save the Value as the Client Secret to be used in the next section.

Client Secret

Client Secret
  1. From the Manage menu on the left hand side, select API Permissions.
  2. Select Add a Permission.

API Permissions

API Permissions
  1. In the new window Select Microsoft Graph, then Delegated permissions.

  2. Add all of the following permissions.

    Files.Read
    Files.Read.All
    Files.ReadWrite
    Files.ReadWrite.All
    offline_access
    Sites.Read.All
    User.Read

Add Permissions

Add Permissions
  1. Select the Overview section of the Azure app, then Select Endpoints. Note the OAuth 2.0 authorization endpoint (v2) and OAuth 2.0 token endpoint (v2) values for use in the next steps. Note: these will differ depending on the type of App created in the prior section (Internal vs Public vs Multi-Tenant)

Endpoints

Endpoints

Kasm Storage Provider Config

  1. Log into the Kasm UI as an administrator.
  2. Select Settings -> Storage -> Add.
  3. Update the form with the following entries, using the Client ID and Client Secret gathered in the previous section.
NameOneDrive
Storage Provider TypeOneDrive
Enabledchecked
Client ID<client id>
Client Secret<client secret>
Authorization URL<OAuth 2.0 authorization endpoint (v2) value from Microsoft OAuth App>
Authorization URL Options{"prompt" : "consent"}
Token URL<OAuth 2.0 token endpoint (v2) value fom Microsoft OAuth App>
Redirect URLhttps://<hostname>/api/cloud_storage_callback
Scope.. code-block:: text Files.Read Files.ReadWrite Files.Read.All Files.ReadWrite.All Sites.Read.All offline_access openid email profile
Root Drive URLhttps://graph.microsoft.com/v1.0/me/drive/root
Default Target/onedrive
Volume Config{ "driver" : "rclone", "driver_opts" : { "type" : "onedrive", "uid" : "1000", "gid" : "1000", "allow_other" : "true" } }
Mount Config{}
  1. Click Save to save the changes.

OneDrive Storage Mapping Configuration

  1. From any page, select the profile icon at the top right of the page.

Edit Profile

Edit Profile
  1. Select the Cloud Storage section, then Add Storage Mapping.

Add Storage Mapping

Add Storage Mapping
  1. Select OneDrive from the dropdown, then select Next.

Configure Storage

Configure Storage
  1. The Microsoft Login page will appear. Login with the desired account.

Login

Login
  1. A consent screen will appear requesting access to the necessary permissions to access OneDrive.

Approve Kasm

Approve Kasm
  1. A redirect will occur to the Workspaces dashboard. The new storage mapping can be seen in the Cloud Storage section of the profile.

Storage Mapping

Storage Mapping
  1. Launch a new container-based session. Verify OneDrive is mapped inside the session at the /onedrive location.

In Session View

In Session View