Forum Discussion
Should DriveItem permission support grantedToV2 in the future?
I'm trying to retrieve both metadata and permissions for a DriveItem using Microsoft Graph API. However, I noticed that the permission models between GET /drive/items/{item-id} and GET /drive/items/{item-id}/permissions seem inconsistent.
References:
1. DriveItem metadata (with permission included):
https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/driveitem?view=odsp-graph-online#relationships
- The permissions property on a DriveItem refers to the Permission resource in the OneDrive API.
2. Permission resource in OneDrive API:
https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/permission?view=odsp-graph-online
- Supports grantedTo but not grantedToV2.
- grantedTo is not marked as deprecated in this API.
3. Permission resource in Graph API:
https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0
- Supports both grandedTo and grantedToV2.
- Explicitly marks grantedTo as deprecated.
Questions:
1. Why is grantedTo not marked as deprecated in the DriveItem metadata response, while it is deprecated in the Microsoft Graph permissions API? (I saw this article mentioning that grantedTo will be deprecated, but it does not specify a timeline.)
2. Should we be using grantedTo or grantedToV2 when retrieving permissions from a DriveItem's metadata?
3. If grantedToV2 is preferred, is there any plan to support grantedToV2 in the GET /drive/items/{item-id} response in the future?
This inconsistency makes it unclear whether grantedTo is still valid or if we should be transitioning to grantedToV2 across all endpoints.
Any clarification from Microsoft would be greatly appreciated!
Thank you.