How to get SiteID of a SharePoint Online Site

To get a SharePoint Online Site id, append the URL with "_api/site".

Example: https://mytenant.sharepoint.com/sites/xyzsite/_api/site.

you can use the SharePoint REST API to get the SiteID:

  1. Open the SharePoint Site:

    • Navigate to the SharePoint site in your web browser.
  2. Modify the URL:

    • Append /_api/site to the site’s URL. For example, if your site URL is https://yourdomain.sharepoint.com/sites/yoursite, change it to https://yourdomain.sharepoint.com/sites/yoursite/_api/site.
  3. Retrieve the SiteID:

    • Press Enter. This will display the site’s information in JSON format. Look for the Id field, which contains the SiteID

No comments

Powered by Blogger.