When I share a file by chat(P2P) in Microsoft Teams app, the file is stored in the OneDrive , so if I interested to remove permission from a specific user that I sent him the file before, I can do this: Getting the users that have permissions with this request:
GET/ https://graph.microsoft.com/v1.0/users/{userId}/drive/items/{itemId}/permissions
It give me all the users that have the permission,so I choose the one that I want to remove it and use this request:
DELETE/ https://graph.microsoft.com/v1.0/users/{userId}/drive/items/{itemId}/permissions/{permissionId}
It's working wonderful. Now I'm interested to do the same with a file that has shared through a Team in Microsoft Team app. But when I check the permissions file with this request:
GET/ https://graph.microsoft.com/v1.0/groups/{groupId}/drive/items/{itemId}/permissions It's not return me permissions for each member on the Team. So my question how it is possible to remove file permissions from a specific member on the Team?
Thanks,