Forum Discussion

xoxidein's avatar
xoxidein
Iron Contributor
May 12, 2022
Solved

Can I See Where On-Premises Security Groups Are Used in SharePoint?

We have dozens of Security Groups synced to M365. Some of them are used in SharePoint. I'd like to see where these groups are being used so we can determine if they are still needed.
  • mr_w1nst0n's avatar
    May 13, 2022

    xoxidein you have to create a PowerShell script for that.

     

    As starting point you can use something similar to: 

    https://www.sharepointdiary.com/2017/06/sharepoint-online-site-users-and-groups-report-powershell.html

     

    If you want to report only On-Premises Groups then you have to adapt the above script:

    • You have to export the list of Groups in Azure AD where source is  "Windows Server AD"
    • Save the output in a txt/csv file
    • Adapt the script to match the name of the Groups present in the output file
    • Execute the script on each site collection

Resources