mirror of
https://github.com/rclone/rclone.git
synced 2026-01-05 01:53:14 +00:00
onedrive: add config option for oauth scope Sites.Read.All (#5883)
This commit is contained in:
@@ -132,11 +132,13 @@ Client ID and Key by following the steps below:
|
||||
2. Enter a name for your app, choose account type `Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)`, select `Web` in `Redirect URI`, then type (do not copy and paste) `http://localhost:53682/` and click Register. Copy and keep the `Application (client) ID` under the app name for later use.
|
||||
3. Under `manage` select `Certificates & secrets`, click `New client secret`. Enter a description (can be anything) and set `Expires` to 24 months. Copy and keep that secret _Value_ for later use (you _won't_ be able to see this value afterwards).
|
||||
4. Under `manage` select `API permissions`, click `Add a permission` and select `Microsoft Graph` then select `delegated permissions`.
|
||||
5. Search and select the following permissions: `Files.Read`, `Files.ReadWrite`, `Files.Read.All`, `Files.ReadWrite.All`, `offline_access`, `User.Read`. Once selected click `Add permissions` at the bottom.
|
||||
5. Search and select the following permissions: `Files.Read`, `Files.ReadWrite`, `Files.Read.All`, `Files.ReadWrite.All`, `offline_access`, `User.Read`, and optionally `Sites.Read.All` (see below). Once selected click `Add permissions` at the bottom.
|
||||
|
||||
Now the application is complete. Run `rclone config` to create or edit a OneDrive remote.
|
||||
Supply the app ID and password as Client ID and Secret, respectively. rclone will walk you through the remaining steps.
|
||||
|
||||
The `Sites.Read.All` permission is required if you need to [search SharePoint sites when configuring the remote](https://github.com/rclone/rclone/pull/5883). However, if that permission is not assigned, you need to set `disable_site_permission` option to true in the advanced options.
|
||||
|
||||
### Modification time and hashes
|
||||
|
||||
OneDrive allows modification times to be set on objects accurate to 1
|
||||
@@ -493,7 +495,7 @@ setting:
|
||||
4. `Set-SPOTenant -EnableMinimumVersionRequirement $False`
|
||||
5. `Disconnect-SPOService` (to disconnect from the server)
|
||||
|
||||
*Below are the steps for normal users to disable versioning. If you don't see the "No Versioning" option, make sure the above requirements are met.*
|
||||
*Below are the steps for normal users to disable versioning. If you don't see the "No Versioning" option, make sure the above requirements are met.*
|
||||
|
||||
User [Weropol](https://github.com/Weropol) has found a method to disable
|
||||
versioning on OneDrive
|
||||
@@ -527,8 +529,8 @@ is a great way to see what it would do.
|
||||
|
||||
### Excessive throttling or blocked on SharePoint
|
||||
|
||||
If you experience excessive throttling or is being blocked on SharePoint then it may help to set the user agent explicitly with a flag like this: `--user-agent "ISV|rclone.org|rclone/v1.55.1"`
|
||||
|
||||
If you experience excessive throttling or is being blocked on SharePoint then it may help to set the user agent explicitly with a flag like this: `--user-agent "ISV|rclone.org|rclone/v1.55.1"`
|
||||
|
||||
The specific details can be found in the Microsoft document: [Avoid getting throttled or blocked in SharePoint Online](https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-or-blocked-in-sharepoint-online#how-to-decorate-your-http-traffic-to-avoid-throttling)
|
||||
|
||||
### Unexpected file size/hash differences on Sharepoint ####
|
||||
@@ -537,7 +539,7 @@ It is a
|
||||
[known](https://github.com/OneDrive/onedrive-api-docs/issues/935#issuecomment-441741631)
|
||||
issue that Sharepoint (not OneDrive or OneDrive for Business) silently modifies
|
||||
uploaded files, mainly Office files (.docx, .xlsx, etc.), causing file size and
|
||||
hash checks to fail. There are also other situations that will cause OneDrive to
|
||||
hash checks to fail. There are also other situations that will cause OneDrive to
|
||||
report inconsistent file sizes. To use rclone with such
|
||||
affected files on Sharepoint, you
|
||||
may disable these checks with the following command line arguments:
|
||||
@@ -548,9 +550,9 @@ may disable these checks with the following command line arguments:
|
||||
|
||||
Alternatively, if you have write access to the OneDrive files, it may be possible
|
||||
to fix this problem for certain files, by attempting the steps below.
|
||||
Open the web interface for [OneDrive](https://onedrive.live.com) and find the
|
||||
Open the web interface for [OneDrive](https://onedrive.live.com) and find the
|
||||
affected files (which will be in the error messages/log for rclone). Simply click on
|
||||
each of these files, causing OneDrive to open them on the web. This will cause each
|
||||
each of these files, causing OneDrive to open them on the web. This will cause each
|
||||
file to be converted in place to a format that is functionally equivalent
|
||||
but which will no longer trigger the size discrepancy. Once all problematic files
|
||||
are converted you will no longer need the ignore options above.
|
||||
|
||||
Reference in New Issue
Block a user