rest endpoint to get a web within a site based on its ID

Frequent Contributor

Is there a rest api to get a specifc web from a site based on its ID? The web may be nested underneath a subsite somewhere under a subsite, so I cannot use Rootweb/Webs.

1 Reply

Microsoft Graph is there to help you on getting the site based on site ID in SharePoint Online. Below is the URL format for requesting the site information,

 

https://graph.microsoft.com/beta/sharepoint/sites/<SiteCollectionID>,<SiteID>

 

Example:

https://graph.microsoft.com/beta/sharepoint/sites/3b22dd53-e74e-4633-b29e-d2c132745ebb,d255da02-fe02...