Forum Discussion

learner7's avatar
learner7
New Member
1 year ago
Solved

Get All Lists and Libraries from a SharePoint Collection

Hello Community,

 

I am a beginner to Power BI. I want to create a report that pulls all SharePoint sites where I am a Site Collection Admin and want to get all lists and libraries URLs under those SharePoint sites. Can someone provide some steps that I would need to follow to create that report? 

 

I appreciate any help. 

  • learner7  Try this 

    Use PowerShell to list all site collections where you have administrative access

    You need to ensure:
    • You have the SharePoint Online Management Shell module installed.

     

    Connect-SPOService -Url https://yourtenant-admin.sharepoint.com
    $sites = Get-SPOSite -Limit All
    foreach ($site in $sites) {
    $permissions = Get-SPOUser -Site $site.Url -LoginName "[email protected]" -ErrorAction SilentlyContinue
    if ($permissions) {
    Write-Host "Access to: $($site.Url)"
    }
    }

2 Replies

  • learner7  Try this 

    Use PowerShell to list all site collections where you have administrative access

    You need to ensure:
    • You have the SharePoint Online Management Shell module installed.

     

    Connect-SPOService -Url https://yourtenant-admin.sharepoint.com
    $sites = Get-SPOSite -Limit All
    foreach ($site in $sites) {
    $permissions = Get-SPOUser -Site $site.Url -LoginName "[email protected]" -ErrorAction SilentlyContinue
    if ($permissions) {
    Write-Host "Access to: $($site.Url)"
    }
    }

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi learner7 

     

    I wish you all the best. I would like to confirm whether you have successfully resolved this issue or if you need further assistance. If nilendraFabric 's reply was helpful to you, could you consider marking it as a solution? This will help more users who are facing the same or similar difficulties. Thank you!

     

    Best Regards,
    Yulia Xu