Commands › SharePoint Online

Get-SPOExternalUser

SharePoint Online Microsoft.Online.SharePoint.PowerShell Get-*

Returns external users in the tenant.

Quick start script

# Get-SPOExternalUser — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Run and inspect
Get-SPOExternalUser | Format-List

# 3. Export for evidence / drift tracking
Get-SPOExternalUser | Export-Clixml .\SPOExternalUser-$(Get-Date -Format yyyyMMdd).xml

Syntax

Get-SPOExternalUser [[-Position] <Int32>] [[-PageSize] <Int32>] [[-Filter] <String>] [[-SortOrder] <SortOrder>]
 [[-SiteUrl] <String>] [-ShowOnlyUsersWithAcceptingAccountNotMatchInvitedAccount <Boolean>]
 [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-Filter String Limits the results to only those users whose first name, last name, or email address begins with the text in the string using a case-insensitive comparison.
-PageSize Int32 Specifies the maximum number of users to be returned in the collection.
-Position Int32 Use to specify the zero-based index of the position in the sorted collection of the first result to be returned.
-ShowOnlyUsersWithAcceptingAccountNotMatchInvitedAccount Boolean Shows users who have accepted an invite but not using the account the invite was sent to.
-SiteUrl String Specifies the site to retrieve external users for.
-SortOrder SortOrder Specifies the sort results in Ascending or Descending order on the SPOUser.Email property should occur.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.