-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
onedrive: add support for no admin mode #8822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Add noadmin and tenant_url configuration options - Support for OneDrive without admin privileges using SharePoint API - Modify API endpoint routing for IsNoAdmin mode - Update parseNormalizedID and buildDriveDeltaOpts functions This integrates the key functionality from nickfox-taterli/rclone for scenarios where admin access is not available.
Can you explain more why you would need to use this please @KyokoMiki ? Does it help people with university accounts whose administrators don't allow rclone? So is it a replacement for https://rclone.org/webdav/#sharepoint-online ? |
Microsoft allows every student to create a free school account, but it does not require schools to register an administrator for management. Therefore, for such SharePoint accounts, students cannot use the API to connect to OneDrive via rclone. If the school does not intend to manage the tenant, students cannot authorize API access. The WebDAV method has become invalid, which means that in the future, it will no longer be possible to connect to OneDrive through rclone. Or update the method of obtaining cookies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch looks quite simple and we can simplify it a bit more (see inline).
This probably needs instructions on when and how to use it in the docs though.
I presume that the token will expire after some time as I don't see a refresh token - is this one hour?
backend/onedrive/onedrive.go
Outdated
Default: fs.SizeSuffix(-1), | ||
Advanced: true, | ||
}, { | ||
Name: "noadmin", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we really need this flag - we can just use whether tenant_url
is empty string or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to use only tenant_url in 09e7c55
The token expiration and refresh mechanism is currently completely unknown, approximately around one day. Automatic token refresh could be implemented if the specific refresh mechanism is known. |
What is the purpose of this change?
Support for OneDrive without admin privileges.
The working principle is simple: it adds an option to overwrite the base URL, allowing connection to business OneDrive without admin access.
Manual Credential Acquisition for Business OneDrive
The working principle is simple: it adds an option to overwrite the base URL, allowing connection to business OneDrive without admin access.
Steps to Manually Obtain Credentials
Open your browser and navigate to
https://[your-tenant].sharepoint.com/
Open Developer Tools (Press F12) and go to the Network tab
Search for
driveAccessToken
in the network requestsExtract the following information:
Rclone Configuration Format
Since the exact expiry time cannot be determined from web traffic, set the expiry to a future date.
Was the change discussed in an issue or in the forum before?
https://github.com/nickfox-taterli/rclone
https://www.taterli.com/7187
Checklist