Microsoft Graph API - Fetch Sharepoint Sites - New Sites not listed

Artha Wijendra 131 Reputation points
2020-09-30T16:03:54.94+00:00

Have been using https://graph.microsoft.com/v1.0/sites endpoints to list all SharePoint sites successfully (Teams Sites, Communication Sites, Document Content Sites) both against my trial SharePoint account as well as at a third party SharePoint account (auth is client credentials)

The third-party created some new sites yesterday and they are not listed in the response (all of the sites created before, even last month are listed as expected).

Thus created new sites (one Teams Site, one Communication Sites, and one Document Content Site with the same settings as my third party client) against my SharePoint Collection and noticed that the new sites are not displayed right away (I can access them via the site URL). Only after about a 5-minute delay, they start appearing in the REST response.

Wondering whether the Graph API is not fetching site information from the live repository and if it relies on some sort of a cache? And if so why do I not get similar results with my third-party SharePoint sites (even with a lag)?

Has anyone experienced this recently (as I believe this used to work fine with new sites before)?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Baker Kong-MSFT 3,801 Reputation points
    2020-10-01T02:34:29.96+00:00

    Hi @Artha Wijendra ,

    Per the API documents, this endpoint of enumerating sites is only available in /beta version. Hence i belive the related functionlaity are not yet perfect.

    You can have a try below alternative method:

    There is a list in tenant-admin site that stores a cached copy of aggregated site collections data from all contentdb.

    • Get tenant -admin site:

    29420-image.png

    • Find the lists: DO_NOT_DELETE_SPLIST_TENANTADMIN_AGGREGATED_SITECO and DO_NOT_DELETE_SPLIST_TENANTADMIN_ALL_SITES_AGGREGA

    29591-image.png

    29490-image.png

    These lists contain all site collection info.

    29545-image.png
    29572-image.png

    One list includes personal site and another does not.

    Best Regards,
    Baker Kong


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.