Fix SharePoint Online PowerShell Access Denied for Site Users
Question details
Resolve access denied errors when listing SharePoint Online site users or groups with PowerShell.

- 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.
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.
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.
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.
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.
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.

Compare CSP access with another administrator account
Use this check if the error continues after confirming the target site's administrators.
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.

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.




