Get-SPOUser
Published: July 16, 2012
Applies to: Office 365 | SharePoint Online
Returns the SharePoint Online user or security group accounts that match a given search criteria.
Get-SPOUser [-Site] <SpoSitePipeBind> [[-Limit] <String>]
Get-SPOUser [-Site] <SpoSitePipeBind> [[-Group] <String>] [[-Limit] <String>]
Get-SPOUser [-Site] <SpoSitePipeBind> [[-LoginName] <String>]
Parameters
1| Parameter | Required | Type | Description |
| Site | Required | Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind | Specifies the URL of the site collection to get the user from. |
| Limit | Optional | System.Int32 | Specifies the maximum number of users returned. The default value is to return all users. |
| Parameter | Required | Type | Description |
| Site | Required | Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind | Specifies the URL of the site collection to get the user from. |
| Group | Optional | System.String | Specifies the group to get the users from. |
| Limit | Optional | System.Int32 | Specifies the maximum number of users returned. The default value is to return all users. |
| Parameter | Required | Type | Description |
| Site | Required | Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind | Specifies the URL of the site collection to get the user from. |
| LoginName | Optional | System.String | Specifies the user name. |
Detailed Description
This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet Parameter Sets.
The Get-SPOUser cmdlet matches one and only one user or security group.
You must be a SharePoint Online global administrator and a site collection administrator to run the Get-SPOUser cmdlet.
Input Types
Return Types
--------EXAMPLE 1--------
Get-SPOUser -Site https://contoso.sharepoint.com/sites/finance
Example 1 returns all user or security group accounts from the site collection http://contoso.sharepoint.com/sites/finance.
--------EXAMPLE 2--------
Get-SPOUser -Site https://contoso.sharepoint.com/sites/finance -LoginName melissa.kerr@contoso.com
Example 2 returns one user or security group account whose user name is HYPERLINK "mailto:melissa.kerr@contoso.com" melissa.kerr@contoso.com from the site collection https://contoso.sharepoint.com/sites/finance.
--------EXAMPLE 3--------
Get-SPOUser -Site https://contoso.sharepoint.com/sites/finance -Group "Team Site Members"
Example 3 returns one user or security group account inside group Team Site Members from the site collection http://contoso.sharepoint.com/sites/finance.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |
