If you’re working with Microsoft Graph and SharePoint, you’ll often need IDs like the site-id, list-id, or drive-id. A quick way to get these is using Microsoft’s tool: Graph Explorer. In this post, you’ll learn how to get site-id with Graph Explorer, along with other useful details you’ll need for scripting, automation, or app development.
Open Graph Explorer
Start by visiting https://developer.microsoft.com/graph/graph-explorer.
Log in with your Microsoft 365 account to access your organization’s SharePoint data.

You can do so by clicking the profile icon in the upper right corner. After loging in the “Tenant” will show your tenant name instead of ‘sample’.
Get Site-Id
There are two ways you can go about doing this, the first one is by search
https://graph.microsoft.com/v1.0/sites?search=your-site-name
This will potentially give you multiple responses, so scroll through and find the one with the name your actually searching for. The site-id is the value named 'id'
.

It will look like this:
{ "id": "yourdomain.sharepoint.com,SOME_GUID,ANOTHER_GUID" }
The other way to get your site is if you know the specific site-url you can build the graph query like this
https://graph.microsoft.com/v1.0/sites/YOUR_DOMAIN.sharepoint.com:/sites/NAME_OF_SITE/
And the result will be similar to the one above – but this wont have a ‘value’ array first – it will give you the site info directly

Getting other information
When you have the site-id you can use it to get other resources like like lists, drives etc. This is usefull if you are using graph to to CRUD operations (create, read, update, delete).
Get drive id or list id
To get drive-id or list-id you simply need to do a request to
//Drives https://graph.microsoft.com/v1.0//sites/{site-id}/drives //Lists https://graph.microsoft.com/v1.0//sites/{site-id}/lists
Get items
When you have the drive or list id you can use that to get items from the list/drive
//Drives https://graph.microsoft.com/v1.0//sites/{site-id}/drives/{drive-id}/items //Lists https://graph.microsoft.com/v1.0//sites/{site-id}/lists/{list-id}/items
Final Tips
Always make sure to log in in Graph Explorer to access organizational data.
If something doesn’t show up, you might need additional Graph permissions (e.g., Sites.Read.All
).
Use the “Access token” tab to inspect what permissions are in use.
If you are interested in Microsoft 365 Development you might also like my other blogposts in this category.
Also, if you have any feedback or questions, please let me know in the comments below. 🙂
Thank you for reading, and happy coding!
/Eli
If you want to support my content you can