How Can i get permissionId

Isaac 0 Reputation points
2023-11-06T07:33:51.3666667+00:00

Hi,

Im listing drive files from Graph API. But i need Permission for the File for specific User so i get this example get permission API. But in this api how can i get permissionId ?

https://learn.microsoft.com/en-us/graph/api/permission-get?view=graph-rest-1.0&tabs=http

Can you give some Example pls.

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

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 31,976 Reputation points
    2023-11-07T08:43:40.4333333+00:00

    Hi @Isaac

    You can call the list permissions API to get the permission id.

    GET /drives/{drive-id}/items/{item-id}/permissions
    GET /groups/{group-id}/drive/items/{item-id}/permissions
    GET /me/drive/items/{item-id}/permissions
    GET /me/drive/root:/{path}:/permissions
    GET /sites/{siteId}/drive/items/{itemId}/permissions
    GET /users/{userId}/drive/items/{itemId}/permissions
    

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.