Restore a File Hosted in a Private Teams Channel from Version History
Step 1: Find the Private Channel's SharePoint Site URL
- In the private channel, click on the Files tab
- Click "Open in SharePoint" at the top
- Copy the URL - it will look like:
https://yourtenantname.sharepoint.com/sites/TeamName-PrivateChannelName
:::info Alternatively, you can find it via PowerShell if the above doesn't work. :::
Step 2: Grant Yourself Site Collection Admin Rights
I had to use the PowerShell method (Option B) as the site was not found when searching for it in the SharePoint admin center
Option A: SharePoint Admin Center (Easiest)
- Go to SharePoint Admin Center (admin.microsoft.com → SharePoint)
- Click Active sites
- Search for the private channel site (use the site name or URL from Step 1)
- Select the site, then click Membership in the command bar
- Under Site admins, click Manage
- Add yourself as a site collection administrator
Option B: PowerShell (If the site isn't showing up yet)
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Connect-SPOService -Url https://yourtenantname-admin.sharepoint.com
Set-SPOUser -Site "https://yourtenantname.sharepoint.com/sites/TeamName-PrivateChannelName" -LoginName "youremail@domain.com" -IsSiteCollectionAdmin $true
# Real Commands:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Connect-SPOService -Url https://rlgbuilds-admin.sharepoint.com
# To ADD Site Collection Administrator permission
Set-SPOUser -Site https://rlgbuilds.sharepoint.com/sites/RLGSafety-GEMSafety -LoginName "jeff.ricica@rlgbuilds.com" -IsSiteCollectionAdmin $true
# To REMOVE Site Collection Administrator permission
Set-SPOUser -Site https://rlgbuilds.sharepoint.com/sites/RLGSafety-GEMSafety -LoginName "jeff.ricica@rlgbuilds.com" -IsSiteCollectionAdmin $false
Step 3: Restore the File Version
- Go back to the file in Teams (or in SharePoint directly)
- Open Version History
- Click Restore on the last good version - it should work now
Step 4: Clean Up (Optional)
After restoring, you may want to remove yourself as Site Collection Admin (command above) if you don't need ongoing access, though keeping it won't hurt anything.