onedrive: fix references to deprecated permissions properties

Before this change, metadata permissions used the `grantedTo` and
`grantedToIdentities` properties, which are deprecated on OneDrive Business in
favor of `grantedToV2` and `grantedToIdentitiesV2`. After this change, OneDrive
Business uses the new V2 versions, while OneDrive Personal still uses the
originals, as the V2 versions are not available for OneDrive Personal. (see
https://learn.microsoft.com/en-us/answers/questions/1079737/inconsistency-between-grantedtov2-and-grantedto-re)
This commit is contained in:
nielash
2024-04-21 21:39:15 -04:00
committed by Nick Craig-Wood
parent 76cea0c704
commit 68dc79eddd
4 changed files with 71 additions and 35 deletions

View File

@@ -754,7 +754,7 @@ Example for OneDrive Business:
[
{
"id": "48d31887-5fad-4d73-a9f5-3c356e68a038",
"grantedToIdentities": [
"grantedToIdentitiesV2": [
{
"user": {
"displayName": "ryan@contoso.com"
@@ -775,7 +775,7 @@ Example for OneDrive Business:
},
{
"id": "5D33DD65C6932946",
"grantedTo": {
"grantedToV2": {
"user": {
"displayName": "John Doe",
"id": "efee1b77-fb3b-4f65-99d6-274c11914d12"
@@ -796,10 +796,12 @@ format. The [`--metadata-mapper`](https://rclone.org/docs/#metadata-mapper) tool
be very helpful for this.
When adding permissions, an email address can be provided in the `User.ID` or
`DisplayName` properties of `grantedTo` or `grantedToIdentities`. Alternatively,
an ObjectID can be provided in `User.ID`. At least one valid recipient must be
provided in order to add a permission for a user. Creating a Public Link is also
supported, if `Link.Scope` is set to `"anonymous"`.
`DisplayName` properties of `grantedTo` or `grantedToIdentities` (these are
deprecated on OneDrive Business -- instead, use `grantedToV2` and
`grantedToIdentitiesV2`, respectively). Alternatively, an ObjectID can be
provided in `User.ID`. At least one valid recipient must be provided in order to
add a permission for a user. Creating a Public Link is also supported, if
`Link.Scope` is set to `"anonymous"`.
Example request to add a "read" permission: