Please recheck the response, it must be having id in the following format:
"id": "<hostname>,<site id>,<web id>"
Here web id is subsite id.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am using Microsoft Graph API to list files in Sharepoint sites.
I am trying to list the files in a subsite but I am not able to get the id of the subsite.
When I run https://graph.microsoft.com/v1.0/sites/{parent_site_id}/sites in Graph Explorer, I can see all the subsites listed but the id is the same as that of the parent site's id for all of them.
Please recheck the response, it must be having id in the following format:
"id": "<hostname>,<site id>,<web id>"
Here web id is subsite id.
Hi @User3,
Your URL is fine, maybe your Parent Site ID is wrong. Please navigate to this address to check if your Parent Site ID is correct:
https://<tenant>.sharepoint.com/sites/<site-url>/_api/site/id
Then try to get the IDs of all subsites under the site again. The same number of data will be returned in the value as the number of subsites.
The id of the subsite is the last one:
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.