C
C#2y ago
AAA

❔ Graph Service Client with Sharepoint

Im silently logging the user using their signed-in account on windows. i ask for the follwoing permissions :
""User.Read" "Files.ReadWrite.All", "Sites.ReadWrite.All", "Sites.Manage.All"
""User.Read" "Files.ReadWrite.All", "Sites.ReadWrite.All", "Sites.Manage.All"
When i get a site by its root Id I can see the name of the site and the last modified date but not the lists and the users involved. Site lists shows null. anyone knows why? Also I do have delegated permissions added on the app registration on azure portal
var res = await graphServiceClient.Sites["my site id"].GetAsync(); // I am able to see the site name and last modified date


var lists = res.Lists; //This is null even though the iste does have 3 lists in it
var res = await graphServiceClient.Sites["my site id"].GetAsync(); // I am able to see the site name and last modified date


var lists = res.Lists; //This is null even though the iste does have 3 lists in it
2 Replies
Messiah
Messiah2y ago
use the debugger to look at res I'm willing to be it's been populated properly, its just not displaying I might be wrong, but adding a .ToList() linq there might fix it
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server