The Microsoft Graph API C# SDK seems to return null for some of the fields of items queried with the SharedWithMe request. This includes notably the WebDavUrl and the Package Type.
I made sure to have a OneNote item shared with me and verified the correctness of the data over the Graph Explorer. I also verified that the permissions of my application were set correctly as : "User.Read Notes.Read.All Sites.Read.All Files.Read.All"
var graphClient = MicrosoftGraphService.Instance.GraphProvider;
var driveItems = await graphClient.Me.Drive.SharedWithMe().Request().GetAsync();
foreach (var item in driveItems)
{
if (item.Package.Type == "oneNote") {...}
}
When I queried the Graph API over the Graph Explorer (https://developer.microsoft.com/en-us/graph/graph-explorer) with the equivalent GET: https://graph.microsoft.com/v1.0/me/drive/sharedWithMe it showed me all the items that are currently shared with me and all information relating to them. However when I execute the snippet above the PackageType in "item" is always null.
Edit: https://docs.microsoft.com/en-us/graph/api/drive-sharedwithme?view=graph-rest-1.0&tabs=cs suggest querying for the item with remoteItem-driveId and remoteItem-id. I'll see were this will lead me.