How to Find a SharePoint Site ID and Resource ID
Question details
Users need to find the SharePoint site ID and resource ID to configure development tasks, Microsoft Graph API calls, or PowerShell integrations.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Setting up Microsoft Graph API, PowerShell scripts, or Power Automate workflows that require a specific SharePoint site GUID.
- Observed behavior
- SharePoint site information pages do not natively display the site ID or resource ID, requiring users to extract them manually.
Ensure you have the correct SharePoint site URL and the necessary permissions to view site properties or access developer tools in your web browser.
Append the API Path to the SharePoint Site URL
The quickest way to retrieve the site GUID is by using SharePoint's built-in REST API endpoint directly in your web browser.
This method works for most SharePoint Online environments and does not require any specialized development tools or authentication beyond standard site access.
Open your web browser and log in to the specific SharePoint site you want to query (for example: https://companyname.sharepoint.com/sites/sitename).
Click inside the browser's address bar and add `/_api/site/id` to the very end of your site's URL.
Press Enter to load the page. The browser will display an XML response containing the unique Site ID (GUID) enclosed within the `<d:Id>` tags.

Inspect the HTML Page Source
If the API URL method is restricted, you can manually extract the siteId from the HTML source code of the SharePoint page.
Manage Your Documents Effectively with WPS Office
While managing SharePoint and Microsoft Graph requires specialized identifiers and developer tools, handling your daily documents doesn't have to be complicated. WPS Office provides a lightweight, highly compatible alternative for all your word processing, spreadsheet, and presentation needs.
- 1. Download the installer: Visit the official WPS Office website and click the Free Download button for your operating system.
- 2. Install the software: Run the downloaded installer file and follow the on-screen instructions to complete the setup.
- 3. Open your documents: Launch WPS Office to seamlessly open, edit, and manage your documents, spreadsheets, and presentations.

Frequently Asked Questions
What is a SharePoint Site ID used for?
A SharePoint Site ID is a unique identifier (GUID) required by developers to execute Microsoft Graph API calls, run PowerShell scripts, or build Power Automate workflows that interact with data in a specific SharePoint site.
Why does the Microsoft Graph API return multiple site IDs?
When querying SharePoint through Microsoft Graph, the API response may include IDs for the root site, sub-sites, or associated Microsoft 365 groups. You must parse these results or query via a specific relative URL to find the exact GUID that matches your target site.
Can I use PowerShell to find the Site ID?
Yes. You can use the SharePoint Online Management Shell and run the `Get-SPOSite` cmdlet, specifying your target site URL, to retrieve the site properties including its unique GUID.




