Cmdlets for Microsoft SharePoint

Build 25.0.9539

AddUserToGroup

Adds a user to a specified SharePoint group. Helps in managing user access and permissions.

Stored Procedure-Specific Information

The AddUserToGroup stored procedure adds a user to a SharePoint group. The LoginName parameter specifies the user's login name, and the Group parameter specifies the group name.

To execute this procedure, enter:

EXEC AddUserToGroup LoginName = 'i:0#.f|membership|[email protected]', Group = 'Site Members';

Input

Name Type Required Description
LoginName String True The login name of the user to be added to the SharePoint group. This should be in the format 'DOMAIN\\username' for Active Directory users or an email address for Azure AD users.
Group String True The name of the SharePoint group to which the user will be added. This must be specified when adding a user.

Result Set Columns

Name Type Description
Success Boolean Indicates whether the operation to add the user to the group was successful. Returns 'true' for success and 'false' for failure.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 25.0.9539