> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Sites

Retrieve a list of sites accessible by the user.

* **Least privileged** Microsoft Graph permission to access the action via **application**: `Sites.Read.All`.
* **Higher privileged** Microsoft Graph permissions to access the action via **application**: `Sites.ReadWrite.All`.

<Note>
  External Documentation

  To learn more, visit the [SharePoint documentation](https://learn.microsoft.com/en-us/graph/api/site-getallsites?view=graph-rest-1.0\&tabs=http).
</Note>

## Example Output

```json theme={"dark"}
{
	"value": [
		{
			"id": "contoso.sharepoint.com,bf6fb551-d508-4946-a439-b2a6154fc1d9,65a04b8b-1f44-442b-a1fc-9e5852fb946c",
			"name": "Root Site",
			"root": {},
			"siteCollection": {
				"hostname": "contoso.sharepoint.com",
				"dataLocationCode": "NAM",
				"root": {}
			},
			"webUrl": "https://contoso.sharepoint.com"
		},
		{
			"id": "contoso.sharepoint.com,d9ecf079-9b13-4376-ac5d-f242dda55626,746dbcc1-fa2b-4120-b657-2670bae5bb6f",
			"name": "Site A",
			"root": {},
			"siteCollection": {
				"hostname": "contoso.sharepoint.com"
			},
			"webUrl": "https://contoso.sharepoint.com/sites/siteA"
		},
		{
			"id": "contoso.sharepoint.com,fd1a778f-263e-4c43-acdf-d5c2519d80eb,c06016db-dfec-4f79-83a1-09c6dbfd7022",
			"name": "Site B",
			"root": {},
			"siteCollection": {
				"hostname": "contoso.sharepoint.com"
			},
			"webUrl": "https://contoso.sharepoint.com/sites/siteB"
		}
	]
}
```

## Workflow Library Example

[List Sites with Sharepoint and Send Results Via Email](https://library.blinkops.com/workflows/list-sites-with-sharepoint-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-sites-with-sharepoint-and-send-results-via-email/canvas" />
</div>
