Inconsistency between GrantedToV2 and GrantedTo resources for Personal account DriveItem permissions

Andrew Omondi 246 Reputation points Microsoft Employee
2022-11-08T07:58:26.32+00:00

According to the documentation on Graph, the GrantedTo was deprecated to be replaced with GrantedToV2

https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0#properties

This seems to be working for organizational accounts but personal accounts do not return the GrantedToV2 property in the response.

Is this an intentional difference in the API implementation for the personal and organization accounts?

Related to
https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1199
https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1534#issuecomment-1303242492

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,035 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 38,686 Reputation points
    2022-11-08T10:42:39.193+00:00

    Hi @Andrew Omondi

    Personal OneDrive will not return the grantedToV2 parameter, which is specific only to the SharePoint identity set.

    258215-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,701 Reputation points Microsoft Vendor
    2022-11-08T11:50:45.917+00:00

    Hello @Andrew Omondi ,

    grantedToV2 is specific to OneDrive for Business and SharePoint.

    258244-image.png

    258245-image.png

    It appears bit of confusion with documentation, grantedTo and grantedToIdentities will be deprecated going forward and the response will be migrated to grantedToV2 and grantedToIdentitiesV2 respectively under appropriate property names Permission resource type!!

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments