GraphAPI "Sites.selected" Application scope

Gruber, Christian 0 Zuverlässigkeitspunkte
2025-01-10T08:30:26.7033333+00:00

Hi,

for my usecase i need all sites in Sharepoint where i have permissions. Also we want to read the metadate of this pages. We created an App with the permission sites.selectedt Apllication Scope

We tried the following request:

...graph.microsoft.com/v1.0/sites?search=lastModifiedDateTime > '2016-10-18T10:40:59Z' with the expectation to get a list with all sites back with this metadata.

the request doesn´t work, because we have to use "sites.read.all"? Is this still the way, because i don´t want to check all sites and have a appliciation permission with the possibility to read all, rather all sites i´ve got selected and have permissions.

Thanks!

SharePoint
SharePoint
Eine Gruppe von Microsoft-Produkten und -Technologien zum Freigeben und Verwalten von Inhalten, Wissen und Anwendungen.
27 Fragen
{count} Stimmen

1 Antwort

Sortieren nach: Am hilfreichsten
  1. RaytheonXie_MSFT 38,111 Zuverlässigkeitspunkte Microsoft-Anbieter
    2025-01-13T06:15:36.59+00:00

    Hi @Gruber, Christian,

    The Graph api will list all available sites in an organization. This will need at least Sites.Read.All permission. You could refer to the document

    https://learn.microsoft.com/en-us/graph/api/site-list?view=graph-rest-1.0&tabs=http

    And currently there is no such graph api to list all sites the user have access to, and I feel regretful to inform you that it turns out to be a by-design one. It is highly recommended that you could raise a new ticket on customers’ feedback. The problem may well be released in the future. Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


Ihre Antwort

Fragesteller*innen können Antworten als akzeptierte Antworten markiert werden, wodurch Benutzer*innen wissen, dass diese Antwort das Problem gelöst hat.