Understand when to involve IT support and how automated tools can help maintain permissions at scale
As a business user, you can handle most day-to-day permission management through SharePoint's interface. However, certain scenarios require IT support or automated tools:
Modern SharePoint permission management requires both PnP PowerShell and Microsoft Graph PowerShell for managing Entra groups:
# Install PnP PowerShell for SharePoint management
Install-Module -Name PnP.PowerShell -Force -AllowClobber
# Install Microsoft Graph PowerShell for Entra group management (recommended)
Install-Module -Name Microsoft.Graph -Force -AllowClobber
# Verify installations
Get-Module -Name PnP.PowerShell -ListAvailable
Get-Module -Name Microsoft.Graph -ListAvailable
# Connect to SharePoint
Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/yoursite" -Interactive
# Connect to Microsoft Graph (for Entra group management)
Connect-MgGraph -Scopes "Group.Read.All","Group.ReadWrite.All"
Master these core commands to handle 90% of your permission management tasks:
Before making changes, always understand the current state:
# Get all site permissions
$sitePermissions = Get-PnPSiteGroup
$sitePermissions | Format-Table Title, Users, Roles
# Get detailed permissions for a specific group
Get-PnPGroupMember -Identity "Site Members"
# Get permissions for a specific library
$libraryPermissions = Get-PnPListPermission -Identity "Documents"
$libraryPermissions
# Check if library has unique permissions
$list = Get-PnPList -Identity "Documents"
$list.HasUniqueRoleAssignments
# Get all permissions for a specific user
$userEmail = "maria.garcia@company.com"
Get-PnPUserEffectivePermissions -Identity $userEmail -List "Documents"
# Find all groups a user belongs to
Get-PnPUser -Identity $userEmail | Select-Object Groups
These scripts save hours when managing large teams or multiple site collections:
Scenario: Your Valencia office hired 10 new marketing team members who need access to marketing sites.
-WhatIf parameter when available to see what would happen without making changes.
Scenario: Setting up consistent group structures across multiple department sites.
For compliance and security audits, you need detailed permission reports:
Use case: Generate detailed reports for GDPR compliance or security audits.
# CRITICAL: Monitor unique permissions (broken inheritance)
# WARNING: Unique permissions are NOT best practice - monitor closely!
# Find all items with broken inheritance (MAJOR CONCERN)
$brokenInheritance = Get-PnPList | Where-Object {$_.HasUniqueRoleAssignments -eq $true}
Write-Warning "Found $($brokenInheritance.Count) items with broken inheritance - this should be minimized!"
$brokenInheritance | Select-Object Title, DefaultViewUrl | Export-Csv "BrokenInheritance_$(Get-Date -Format 'yyyyMMdd').csv"
# Check for external users (security risk)
$externalUsers = Get-PnPUser | Where-Object {$_.Email -like "*#ext#*"}
$externalUsers | Select-Object Title, Email, Groups | Export-Csv "ExternalUsers_$(Get-Date -Format 'yyyyMMdd').csv"
# Alert if too many unique permissions found
if ($brokenInheritance.Count -gt 20) {
Write-Error "ALERT: $($brokenInheritance.Count) items with unique permissions exceeds recommended limit of 20!"
}
Valencia Business Scenario: Give external consultants temporary access to project folders that automatically expires.
Always implement cleanup processes for temporary access. Set calendar reminders and automated scripts to review and remove expired permissions.
Scenario: Keep user access consistent across related sites (main site, project sites, archive sites).
# Use -WhatIf parameter when available
Remove-PnPGroupMember -Identity "Site Members" -LoginName "user@company.com" -WhatIf
# Test on a single user before bulk operations
$testUser = "test.user@company.com"
Add-PnPGroupMember -Identity "Marketing Team" -LoginName $testUser
# Start logging
$logFile = "C:\Logs\PermissionChanges_$(Get-Date -Format 'yyyyMMdd_HHmm').txt"
Start-Transcript -Path $logFile
# Your permission changes here
Write-Host "Adding user $userEmail to group $groupName" -ForegroundColor Green
# Stop logging
Stop-Transcript
try {
Add-PnPGroupMember -Identity "Site Members" -LoginName $userEmail
Write-Host "Successfully added $userEmail" -ForegroundColor Green
}
catch {
Write-Warning "Failed to add $userEmail : $($_.Exception.Message)"
# Log error for review
Add-Content -Path $errorLog -Value "$userEmail : $($_.Exception.Message)"
}
Symptoms: Scripts fail with permission errors even when you're a site owner.
Solutions:
-Force parameter where availableSymptoms: Permission scripts take very long to complete.
Optimisation tips:
Get- commands in loops# Verify user exists before adding to groups
$user = Get-PnPUser -Identity $userEmail -ErrorAction SilentlyContinue
if ($user) {
Add-PnPGroupMember -Identity $groupName -LoginName $userEmail
} else {
Write-Warning "User $userEmail not found in SharePoint"
}
These templates provide a starting point for common permission management tasks:
Automatically add new hires to appropriate groups based on department and role.
Remove departing employee access from all sites and groups systematically.
Generate monthly permission reports for compliance and security review.
Keep department groups synchronised across multiple SharePoint sites.