You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do this request await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Permissions.GetAsync() to get permissions of shared with me driveItem .
This request returns collection of permission: owner permission and one or several write and read permission with collection of identities with whom this file was shared. The identities collection is Permission.GrantedToIdentitiesV2 that may contain easier User facet or SiteUser facet or both. For some reason Personal OneDrive does not contain User facet anymore (see #2828)
The question: how to get\find my (effective) permission from this mess?
I tried to identify my permission by matching current user Id (from graphClient.Me.Request().GetAsync()) and Id from SiteUser facet, but they are different,
I can try to use SiteUser.LoginName but seems its data is encoded like SharePoint claim and it is not documented somewhere in Ms Graph. SiteUser facet does not contain email field so i don't know how to find my permission.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I do this request
await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Permissions.GetAsync()
to get permissions of shared with medriveItem
.This request returns collection of permission:
owner
permission and one or severalwrite
andread
permission with collection of identities with whom this file was shared. The identities collection isPermission.GrantedToIdentitiesV2
that may contain easierUser
facet orSiteUser
facet or both. For some reason Personal OneDrive does not containUser
facet anymore (see #2828)The question: how to get\find my (effective) permission from this mess?
I tried to identify my permission by matching current user Id (from
graphClient.Me.Request().GetAsync()
) and Id fromSiteUser
facet, but they are different,I can try to use
SiteUser.LoginName
but seems its data is encoded like SharePoint claim and it is not documented somewhere in Ms Graph.SiteUser
facet does not contain email field so i don't know how to find my permission.Beta Was this translation helpful? Give feedback.
All reactions