Get-SPOUser

Returns the SharePoint Online user or security group accounts that match a given search criteria.

Syntax

Get-SPOUser
   [-Group <String>]
   [-Limit <String>]
   -Site <SpoSitePipeBind>
   [<CommonParameters>]
Get-SPOUser
   [-Limit <String>]
   -Site <SpoSitePipeBind>
   [<CommonParameters>]
Get-SPOUser
   [-LoginName <String>]
   -Site <SpoSitePipeBind>
   [<CommonParameters>]

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 (http://go.microsoft.com/fwlink/?LinkID=187810).

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.

For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251832 (http://go.microsoft.com/fwlink/p/?LinkId=251832).

Examples

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

Required Parameters

-Site

Specifies the URL of the site collection to get the user from.

Type:SpoSitePipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

Optional Parameters

-Group

Specifies the group to get the users from.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-Limit

Specifies the maximum number of users returned. The default value is to return 500 users. To return all users specify the value “All”.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online
-LoginName

Specifies the user name.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online