1
votes

I'm used the Microsoft Graph API to query SharePoint. Until recently I was able to find the "Site Assets" document library via the Graph API. I can no longer find the list.

What queries have I tried:

https://graph.microsoft.com/v1.0/sites/{siteid}/lists?select=weburl

No URL matches the list of Site Assets. Next:

https://graph.microsoft.com/v1.0/sites/{siteid}/drives?select=weburl

Again no URL matches the list of Site Assets. In the past I was always able to find the assets used the second query. I switched both queries to beta, also without result.

I've looked at the changelog in the Graph API, but nothing relevant is listed.

How can I (nowadays) find the "Site Assets" list on any SharePoint Site?

1

1 Answers

5
votes

By default both the lists and drives enumerations attempt to hide system objects, but unfortunately doing so in SharePoint is non-trivial. As a result some system lists were still coming through until recently when we made sure they didn't.

You can still see them, but you'll need to explicitly ask for them by requesting the system facet.

https://graph.microsoft.com/v1.0/sites/{siteid}/lists?select=weburl,system
https://graph.microsoft.com/v1.0/sites/{siteid}/drives?select=weburl,system