How to Retrieve SharePoint Site and Subsite GUID
This article provides step-by-step instructions to retrieve the GUID (Globally Unique Identifier) for a SharePoint site and its subsites
Retrieve the SharePoint Site GUID
To get the GUID of a SharePoint site, use the following URL structure and copy and paste the URL into your web browser:
https://<tenant>.sharepoint.com/sites/<sitename>/_api/site/id
- Replace
<tenant>
with your SharePoint tenant (e.g., your organization’s domain). - Replace
<sitename>
with the name of your SharePoint site.
The XML response will include the site GUID within the <d:Id>
tags, as shown in the example below. The GUID is highlighted yellow for reference:
Retrieve the SharePoint Subsite GUID
To get the GUID of a SharePoint subsite, use the following URL structure and copy and paste the URL into your web browser:
https://<tenant>.sharepoint.com/sites/<sitename>/<subsitename>/_api/web
- Replace
<tenant>
with your SharePoint tenant (e.g., your organization’s domain). - Replace
<sitename>
with the name of your SharePoint site.
- Replace
<subsitename>
with the name of your SharePoint subsite.
The XML response will contain the site GUID within the <d:Id>
tags, as shown in the sample below. The GUID is highlighted yellow for clarity:
<title />
<updated>2024-09-06T20:51:49Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:AllowRssFeeds m:type="Edm.Boolean">true</d:AllowRssFeeds>
<d:CurrentChangeToken m:type="SP.ChangeToken">
<d:StringValue>1;2;b2870a03-6318-4b3a-8a0f-fef6815af00c;638612527096730000;819006137</d:StringValue>
</d:CurrentChangeToken>
</content>
</entry>
Ensure that you are logged into your SharePoint instance before proceeding.