Use top parameter on List lists of site api will return nothing

静维 李 0 Reputation points
2023-08-23T06:29:07.3033333+00:00

User's image

User's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,507 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ab-8756 805 Reputation points
    2023-08-24T19:41:53.2166667+00:00

    Hello 静维 李,
    Thank you for reaching out to this Q&A Forum.

    Please specify what is your end goal here. Are you trying to list all the sites, you can do
    https://graph.microsoft.com/v1.0/search/query
    In the body add;-

    {

    "requests": [

    {

    "entityTypes": [

    "site"

    ],

    "query": {

    "queryString": "*"

    }

    }

    ]

    }
    Here is the reference article;-
    https://learn.microsoft.com/en-us/graph/search-concept-files#example-3-search-sites
    Can also add size properties;-
    "from": 0,

    "size": 500

    Hope that helps.
    Thanks
    --please don't forget to upvote and Accept as answer if the reply is helpful—


Your answer

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