msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

User facet in Sharing Permission has invalid user Id (OneDrive Personal)

Open 23W opened this issue 11 months ago • 1 comments

Describe the bug

The file was shared from one Personal account to other Personal account with "edit" right (Role is writer). If MsGraph is signed in as delegated by this other Personal account and executes await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Permissions.GetAsync() to get the item permissions it will receive collection of permissions for file owner and for this account.

The permission for this account will have filed grantedToIdentities with user facet (see https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0#properties and https://learn.microsoft.com/en-us/graph/api/resources/identityset?view=graph-rest-1.0#properties).

User face will have correct user's displayName but wrong id.

Example: Image

The correct user id for this delegated account you can see by await graphClient.Me.Request().GetAsycn(). This is not "46" but "5f6aae90c74bde86".

Image

Expected behavior

User facet should have correct user's id.

How to reproduce

execute get list of shared with me file permissions and compare user's id with id of the same account but get from me request.

SDK Version

4.11.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

23W avatar Feb 13 '25 11:02 23W

this is new bug, around month ago everything worked fine

23W avatar Feb 13 '25 12:02 23W