microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

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

Open
#2,832 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Service issue type:bug
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

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_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with Drives["{drive-id}"].Items["{driveItem-id}"].Permissions.GetAsync() for a shared OneDrive Personal file. Compare the grantedToIdentities user id with the id returned by graphClient.Me.Request().GetAsycn(); done means the permission response returns the delegated account's correct id, with the behavior covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.