Forum Discussion

nareshsp333's avatar
nareshsp333
Copper Contributor
Dec 30, 2018

How to take the list of all the user groups and their members of all groups

Dear Support team,

 

i need a help in sharepoint online to take the list of sharepoint custom created groups and default groups (site collection) and  their members through script. 

 

and how to take report of checked out files in the site collection (doc library, modified dates, checked out by fields)

 

and the site collection permisions (users and groups) - all the types of permisions that every user has down to the document level

 

Regards 

Naresh K

4 Replies

  • Rachel_Davis's avatar
    Rachel_Davis
    Steel Contributor
    I would just use Sharegate. It's a 3rd party application that makes doing this type of reporting really easy. The only gap I've had is that I can't run a report to show all the groups that have NO access and then be able to automatically delete them. I use it almost daily to monitor/manage all my sites and groups. I have no ties to the company so this is not a promotion. It's just a suggestion to use a pre-packaged solution that will do what you've asked and a whole lot more. Why re-invent the wheel?
  • Ali Salih's avatar
    Ali Salih
    Iron Contributor
    Naresh. This is not a support forum, you may not get support. However, people in the community can provide some guidance.

    My advise is to check out the PnP PowerShell module and script the report generation the way you prefer. Since your requirements are unique, you may have to saw together couple scripts to achieve what you are looking for.
    • nareshsp333's avatar
      nareshsp333
      Copper Contributor

      Hi Ali Salih,

      Thank you for checking this. and i have found the some script in google

      To get the Custom and Default groups

      $siteURL = "https://Domain.sharepoint.com/teams/XXX"
      $x = Get-SPOSiteGroup -Site $siteURL
      foreach ($y in $x)
          {
              Write-Host $y.Title -ForegroundColor "Yellow"
              Get-SPOSiteGroup -Site $siteURL -Group $y.Title | Select-Object -ExpandProperty Users
              Write-Host
          }

      and its taking all custom and default group members, but its not possible to get the data for document level permissions. and check-in and check out files i am checking in Audit logs (Protection.office.com).

      Thanks
      Naresh K

       

      • Ali Salih's avatar
        Ali Salih
        Iron Contributor
        Take a look at the PNP PowerShell and you can get item level permissions and other details. As I said, you need to put it together.

Resources