Troubleshooting OneDrive storage mapping for non-admin users
Problem
A user configures storage mapping for OneDrive, but then when launching a workspace the session start fails with a UI error message that reads…
Create Kasm
An Unexpected Error occurred creating the Kasm. Please contact an Administrator.
The ERROR logs recorded might be similar to the following:
Error during Create request for Server(0199bf74-e21c-4cf3-97bf-f17c34e3ec0f) : (Exception creating Kasm: Traceback (most recent call last):
File "docker/api/client.py", line 268, in _raise_for_status
File "requests/models.py", line 1021, in raise_for_status
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.43/volumes/create
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "__init__.py", line 539, in post
File "provision.py", line 1359, in provision
File "provision.py", line 1216, in process_storage_mapping
File "provision.py", line 1210, in process_storage_mapping
File "docker/models/volumes.py", line 57, in create
File "docker/api/volume.py", line 89, in create_volume
File "docker/api/client.py", line 274, in _result
File "docker/api/client.py", line 270, in _raise_for_status
File "docker/errors.py", line 31, in create_api_error_from_http_exception
docker.errors.APIError: 500 Server Error for http+docker://localhost/v1.43/volumes/create: Internal Server Error ("create 5ed809e0b86eb08e27c13017ce0c69f52db170ea1c6e17ecca725a5455222bb5: VolumeDriver.Create: unable to get drive_id and drive_type - if you are upgrading from older versions of rclone, please run `rclone config` and re-configure this backend")
)
There might be a DEBUG level log that shows the user sent an authentication request to OneDrive.
Successfully authenticated request (create_storage_mapping)
for user (xxxxxxxxxxxxxxxxxx) at (xx.xx.xx.xx, xx.xx.xx.xx)
For some users, the OneDrive mapping might have been working fine initially but then stopped.
Solution
For users that had initial success, then the either the mapping stopped working or unexpectedly workspaces fail the launch and the last configuration change was the storage mapping, this issue is likely caused because initial OneDrive permissions were granted only temporarily. When the access token issued by OneDrive expired, Kasm was unable to reestablish the link to the OneDrive account, and this causes the workspace to fail to load.
In almost all situations, the solution to this problem will be to completely remove and readd the storage mapping. This process should resolve any permissions issues. It is important to grant the permissions when prompted by OneDrive during the setup procedures described here (OneDrive Storage Mapping Configuration — Kasm 1.16.1 documentation ).
One very important permission is the offline access permission which represents itself in the list as “Maintain access to data you have given Kasm OneDrive MY-KASM access to.“ Without this permission, the OneDrive storage mapping will only work until the access token expires, then Kasm will be unable to renew the token on your behalf.
A user can review the permissions granted to Kasm by going to the Microsoft app manage page (https://account.live.com/consent/Manage) .
Impacted Versions:
Issues were first observed on the following versions, but may impact other versions as well.
1.14.0
Resolved Versions:
The issue is no longer applicable for the following and newer versions.
None
Related Docs:
Related articles
Links to related kb articles in the Confluence project