Add-SPOUser
Published: July 16, 2012
Applies to: Office 365 | SharePoint Online
Adds an existing Office 365 user or an Office 365 security group to a SharePoint group.
Add-SPOUser [-Site] <SpoSitePipeBind> [-LoginName] <String> [-Group] <String>
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| Site | Required | Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind | Specifies the URL of the site collection to which you want to add the user. |
| LoginName | Required | System.String | Specifies the login name of the user to add. |
| Group | Required | System.String | Specifies the name of the SharePoint group to add the user or the security group to. |
Detailed Description
Along with the group memberships that are normally required to run Windows PowerShell, you must be a SharePoint Online global administrator and a site collection administrator to use the Add-SPOUser cmdlet.
Input Types
Return Types
--------EXAMPLE 1--------
Add-SPOUser -Site https://contoso.sharepoint.com/sites/sc1 -LoginName joe.healy@contoso.com -Group "SC1 Owners"
Example 1 adds a user who has the e-mail address joe.healy@contoso.com to the group "SC1 Owners" in the site collection https://contoso.sharepoint.com/sites/sc1.
--------EXAMPLE 2--------
Add-SPOUser -Site https://contoso.sharepoint.com -LoginName melissa.kerr@contoso.com -Group "Team Site Members"
Example 2 adds a user who has the e-mail address melissa.kerr@contoso.com to the group "Team Site Members" in the site collection https://contoso.sharepoint.com.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |
