"External sharing is disabled for the site" error when a delegated partner administrator tries to access a client's SharePoint Online Admin Center

Problem

When a delegated partner administrator tries to access the SharePoint Online Admin Center of one of the partner's clients in Microsoft SharePoint Online, the following error message is returned:

External sharing is disabled for the site.

Solution

To fix this issue, use the SharePoint Online Management Shell to delete the guest account from the client's organization. To do so, run the following cmdlet:

Note

You must run the cmdlet by using a SharePoint admin or global admin account of the client's organization.

$user = Get-SPOExternalUser -Filter someone@example.com
Remove-SPOExternalUser -UniqueIDs @($user.UniqueId)

For more information about this cmdlet, see Remove-SPOExternalUser.

More information

This issue occurs when the account that the delegated partner administrator uses for sign-in was originally invited to the SharePoint Online site of the partner's client as an guest. Guest permissions override a delegated partner's permissions. This prevents guests from accessing the SharePoint Online Admin Center.

For more information, see Partners: Build your business and administer your Microsoft 365 partner account.

Still need help? Go to SharePoint Community.