how to get a list of all sharepoint sites that I am part of with their respective owners details

Solanki, Akshaykumar 1 Reputation point
2023-02-22T17:43:44.65+00:00

how to get a list of all sharepoint sites that I am part of with their respective owners details

I can search for all the site using this contentclass:STS_Site and it does give me all the site information
but How do I also get list of those site owners with it?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AllenXu-MSFT 24,951 Reputation points Moderator
    2023-02-23T02:43:55.8333333+00:00

    Hi @Solanki, Akshaykumar ,

    OOTBly I'm afraid this is not possible to show the sites you are a member of and the site owners of those sites together. I would suggest you can search by "contentclass:STS_Site" and go to SharePoint admin center, then search sites under Sites >> Active sites. Click the site name and you can see site owners under Membership tab. Or you can fetch site owners using PowerShell:

    #Variables for Admin Center & Site Collection URL 
    $AdminCenterURL = "https://Contoso-admin.sharepoint.com" 
    $SiteURL = "https://Contoso.sharepoint.com/sites/marketing"   
    
    #Connect to SharePoint Online 
    Connect-SPOService -url $AdminCenterURL -Credential (Get-Credential)  
     
    #sharepoint online powershell get site owner 
    Get-SPOSite $SiteURL | Select Owner  
    
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Paul de Jong 806 Reputation points
    2023-02-23T12:14:47.5866667+00:00

    It can be done. Also include &selectProperties with Author. This should return the owners. We also include contentclass:STS_Web in the search request to return all subsites (example). There are lots of useful properties that can be returned via search (e.g., related bug site, views, external sharing, ...). It is worth investing time in the search query language and schema. It is very powerful.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.