Last Updated on January 16, 2024
Need to see all the sites you can access?
In this guide, you will learn 2 methods to view all sites you have access to, why the start page doesn’t help, and a PowerShell script you can use.
Let’s get started.
Table of Contents:
The Start Page Doesn’t Help
There is an easy way to find all the sites that you follow and those that you recently visited.
It’s on the start page of your SharePoint Online environment:

Unfortunately, you won’t be able to find all the sites that you have access to.
On the bright side, there are easy ways you can do that.
Related: SharePoint Start Page: The Ultimate Guide for Newbies
Sign up for exclusive updates, tips, and strategies
How to View All Sites You Have Access To
There are two methods you can use here:
- Search: For your personal use
- HCWP: For you or other users
Method 1: Use the search feature
All you need to do here is use the search box on any SharePoint site and type in the following:
contentclass:STS_Site
Note: If you want to search for subsites instead, just use the query contentclass:STS_Web
.
After the system displays the result, go into the sites tab.
There you will see all the SharePoint sites that you have access to:

Related: Search Guide: SharePoint Search Tips and Tricks Overview
You can also use PowerShell to achieve similar results.
Here’s a sample script you can use:
# Connect to SharePoint
Connect-SPOService -Url https://tenant-admin.sharepoint.com
# Set the user's email address
$userEmail = ""
# Get all site collections in the tenant
$sites = Get-SPOSite -Limit All
# Loop through each collection and check if the user has access
foreach ($site in $sites) {
# Get the user's permissions for the site collection
$permissions = Get-SPOUser -Site $site.Url -LoginName $userEmail -ErrorAction SilentlyContinue
if ($permissions) {
# If the user has permissions, output the site collection URL
Write-Host "User $($userEmail) has access to $($site.Url)"
}
}
This script connects to SharePoint, fetches site collections, and checks user access to each site.
Naturally, the results are security trimmed, so you only see all the sites that you have access to.
Method 2: Use HCWP
This method requires you to create a new page and use the highlighted content web part.
Create a new page as you usually would and then add HCWP to the page:

From there, you need to edit the web part and use the following filters:
- Source: All sites
- Type: Pages
- Filter: Content includes the words
- Words: “STS_Site”
You can then change the layout and make sure to display more items (like 50 or 100) at a time:

On the live preview, you can see that all the sites are now being displayed.
Any other users who will visit this page will also see all the sites that they have access to.
Got more questions about viewing all the sites you have access to? If that’s the case, kindly leave a comment below.
For business-related inquiries, you can contact me anytime using the contact form. I will reply as soon as possible.
How do I access visitor log and Access spa pal?