How to get the list of external users in SharePoint Online if there are more than 1000 external users

Sriram Varadarajan
Enterprise Architect
Published On :   30 Jul 2016
Visit Count
Today :  13    Total :   6510

We will all get in to situation to know the list of external users that we have in our SharePoint Online tenant. Usually , Get-spoexternaluser is the command that is used to fetch the list of external users. But this has a hard limit of fetching max of 1000 users.


The Get-spoexternaluser uses .Net DirectorySearcher class to get the Guest users from the Tenant. The reason that it can get only 1000 users is due to the fact the limit about the Directory Searcher is 1000.


If your tenant has large number users ( >1000) the list of external users  can be fetched using the  following method

Get-MsolUser -All | ? {$_.usertype -eq "Guest"}

For getting the list of unlicensed users please use the below command:

Get-MsolUser -UnlicensedUsersOnly -All | ? {$_.usertype -eq "Guest"}

Additional Information can be fetched using the Examples in the KB