SharePoint Online – Give permission to single user on all SharePoint Online sites

I was looking for a way to grant a single user permissions on all sharepoint sites without giving admin permissions.

In the end only a single PowerShell command was needed to accomplish this (apart from running ‘Connect-SPOService’)

Get-SPOSite | ForEach {Set-SPOUser -Site $_.Url -LoginName -IsSiteCollectionAdmin $true}
Where is the username you want to give the permissions to.