O365 / python-o365

A simple python library to interact with Microsoft Graph and Office 365 API
Apache License 2.0
1.65k stars 419 forks source link

How to get the group_id which has permission for the item_id? #1016

Open Vaishnavi21721 opened 11 months ago

Vaishnavi21721 commented 11 months ago

In the class DriveItemPermission the variable granted_to only has the display_name value. I want to access the id also . how culd I do? self.granted_to = granted_to.get('user', {}).get( self._cc('displayName')) or granted_to.get('application', {}).get( self._cc('displayName')) self.share_id = cloud_data.get(self._cc('shareId'), None)

alejcas commented 11 months ago

This is not implemented but very easy to achieve. You can send a PR with the changes to get this Id.

alejcas commented 11 months ago

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

Vaishnavi21721 commented 11 months ago

@janscas I have raised the PR