Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DriveItem permissions: Inconsistency between GrantedToV2 and GrantedTo resources for Personal account #1199

Closed
23W opened this issue Dec 14, 2021 · 3 comments

Comments

@23W
Copy link

23W commented Dec 14, 2021

Describe the bug
Application code has been updated to use new recourse GrantedToV2 instead of deprecated GrantedTo. But behavior of this recourse was changed. For personal account (Ms Live Account) and shared with user drive item, MS Graph request client.Drives[DiskId].Items[ItemId].Permissions.GetAsync() returns IDriveItemPermissionsCollectionPage collection with filled GrantedTo resource but GrantedToV2 is null!

To Reproduce
Steps to reproduce the behavior:

  1. Sign-in with credentials of personal account
  2. Request permissions for some shared with this account drive item ()
  3. GrantedToV2 is null

Expected behavior
When drive item was shared with this account explicitly, GrantedToV2 must not be null and should contain filled user identity.

Desktop:

  • OS: Windows 10

Screenshots:
image

@ghost ghost added the Needs: Triage label Dec 14, 2021
@ghost ghost added this to Issues to triage in Graph SDK - DotNet Dec 14, 2021
@23W 23W changed the title DriveItem permissions: Inconsistency between GrantedToV2 and GrantedTo facets for Personal account DriveItem permissions: Inconsistency between GrantedToV2 and GrantedTo resources for Personal account Dec 14, 2021
@MIchaelMainer
Copy link
Contributor

@23W Have you had the opportunity to observe this behavior for an organizational account? I suspect that we may have an unintentional difference in behavior between the personal and org account types.

This certainly conflicts with the docs. https://docs.microsoft.com/en-us/graph/api/permission-get?view=graph-rest-1.0&tabs=http. I'm not seeing the @deprecated.GrantedTo in your results as AdditionalData is null.

@ificator In case you have insights here.

@23W
Copy link
Author

23W commented Dec 15, 2021

@MIchaelMainer

Have you had the opportunity to observe this behavior for an organizational account?

Everything is ok with organizational accounts.

I'm not seeing the @deprecated.GrantedTo in your results as AdditionalData is null.

Please take look at https://docs.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0
In properties table:

grantedTo (deprecated)
grantedToIdentities (deprecated)

The same in MsGraph metadata:
image

grantedTo is deprecated.

@andrueastman
Copy link
Member

I've posted the query at the link below so that we may get feedback from the API owners on whether this is a known difference between the personal/organizational accounts as this is a query for the API side of things.

https://learn.microsoft.com/en-us/answers/questions/1079737/inconsistency-between-grantedtov2-and-grantedto-re.html

We'll close this one for now so that it may be followed up from there.

Graph SDK - DotNet automation moved this from Issues to triage to Completed Nov 8, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Graph SDK - DotNet
  
Completed
Development

No branches or pull requests

3 participants