Share via


SharePoint Online: how to quickly get site collection access to a user-created teamsite or communication site

If you've enabled the setting, Let users create sites from the SharePoint start page and OneDrive , in your O365 tenant's SharePoint Online Admin Center, those sites that users create don't appear in the SharePoint Online's Site Collection list and you do not automatically have access to them (just like for SharePoint OnPrem). Moreover, the SharePoint Online Admin center (as of this writing) doesn't have the pages that SharePoint OnPrem's Central Administration has for adding yourself as site collection administrator to any site collection in the farm.  Therefore, if a user experienced a problem with his or her user-created site, you'll need to use PowerShell to get yourself the needed access to the user's site so that you can troubleshoot.  Here's the PowerShell script you need to get that access:

Connect-SPOService -Url "https://contoso-admin.sharepoint.com" -Credential "MyAdminAct@CONTOSO.com"
$site=Get-SPOSite -Identity "https://contoso.sharepoint.com/sites/UserSite1"
Set-SPOUser -Site $site -LoginName "MyAdminAct@CONTOSO.com" -IsSiteCollectionAdmin $True

References

Notes

  • I keep scripts like this handy in a single text file that I store locally and on my customer's intranet so as to capture customer environment information for the benefit of the customer.  When I need to use it, I just make a few minor edits and then copy and paste.