Permission & Access Issues

Fix SharePoint Online PowerShell Access Denied for Site Users

Huda QurayshiHuda Qurayshi Nov 22, 2026 869 views

Question details

Resolve access denied errors when listing SharePoint Online site users or groups with PowerShell.

Fix SharePoint Online PowerShell Access Denied for Site Users
Product
SharePoint Online Management Shell
Device & OS
not provided
Scenario
An administrator uses CSP credentials to run Get-SPOSiteGroup or Get-SPOUser against a SharePoint Online site.
Observed behavior
The PowerShell commands return an access denied error.
Before you start

Identify the target site URL and the tenant's SharePoint admin center URL. In PowerShell, run Get-Module -ListAvailable Microsoft.Online.SharePoint.PowerShell to check whether the SharePoint Online Management Shell module is available.

Solution 1Recommended

Connect with an account that has site collection administrator access

Use this approach when the account running the commands may not have the required access to the target site.

The account should have the required SharePoint administrative permissions and be a site collection administrator for the target site. CSP credentials do not necessarily grant site-level access automatically.

1
Check site administrators

In the SharePoint admin center, open Sites > Active sites, select the target site, and review its site admins under Permissions. Have an authorized administrator add the account if needed.

2
Connect to the tenant

In SharePoint Online Management Shell, run Connect-SPOService -Url https://contoso-admin.sharepoint.com, replacing the example URL with your tenant's admin center URL. Sign in with the authorized account.

3
Retry the site commands

Run Get-SPOSiteGroup -Site https://contoso.sharepoint.com/sites/example or Get-SPOUser -Site https://contoso.sharepoint.com/sites/example, replacing the example with the target site URL.

Connect with an account that has site collection administrator access
Use the correct URLs: Connect-SPOService uses the tenant's admin center URL; the -Site parameter uses the target site's URL.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Office format compatibility make it easy to move everyday file work, although it does not fix SharePoint permissions or manage SharePoint PowerShell access.

Open and edit files downloaded from SharePointCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar interface for everyday document workFree and lightweight alternative for routine office tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why can a CSP administrator receive access denied for a SharePoint site?

CSP credentials may not provide the required access to every site. Check the account's delegated permissions and whether it is a site collection administrator for the target site.

Where can I check the site collection administrators?

In the SharePoint admin center, go to Sites > Active sites, select the site, and review its site admins under Permissions.

Which URL should I use with Connect-SPOService?

Use the tenant's SharePoint admin center URL, such as https://contoso-admin.sharepoint.com. Use the target site URL separately with the -Site parameter of Get-SPOSiteGroup or Get-SPOUser.

What if another administrator can run the commands successfully?

Compare the two accounts' SharePoint administrative and site collection administrator permissions. Also check whether the CSP account was created in the tenant or provided by the CSP.