Skip to content

mikelee1313/SPO-Sharing-Scripts

Repository files navigation

SPO-Sharing-Scripts

Overview

SPO-Sharing-Scripts is a collection of PowerShell scripts designed for Microsoft 365 administrators to audit, manage, and remediate sharing links, permissions, and user/group access across SharePoint Online and OneDrive sites. These scripts help you inventory sharing links, analyze user permissions, remove users, and export group information, streamlining security and compliance tasks in your tenant.


PowerShell Scripts Included

Scans SharePoint Online sites to identify all files and folders and their permissions. Outputs detailed permissions information to Excel, including inheritance and user/group roles.


Collects comprehensive information about SPO sites and users, including site properties, group memberships, direct users, Entra/M365 Group associations, and access details, exporting results to CSV.


Inventories sharing links across SPO sites, identifies Organization and Flexible links, and optionally converts Organization links to direct permissions with cleanup capabilities. Supports both detection (report) and remediation modes.


Connects to Exchange Online and exports details of unified groups (M365/Entra Groups) filtered by access type (public/private/all) to CSV, including group alias, email, GUID, and associated SharePoint site URLs.


Removes specified users from SPO site collections, targeting group memberships, direct file/item permissions, and sharing links. Includes logging and throttling handling for robust batch operations.


Additional Documentation


Prerequisites

  • PowerShell 5.x or later
  • SharePoint Online Management Shell or PnP PowerShell modules
  • Appropriate permissions in your Microsoft 365 tenant

License

MIT License. See LICENSE for details.

About

Used to locate Sharing links and users with access across SharePoint Online / OneDrive Sites

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published