SharePoint2007Provider::AddUsersToGroup

This procedure adds one or more user accounts to the specified cross-site group. This call implements rollback.

Arguments

Input Arguments Required Description

<target>

Yes

The URL of the Windows SharePoint Services administration site.

<siteGUID>

Yes

The globally unique identifier (GUID) of Windows SharePoint Services site collection.

<subSiteGUID>

Yes

The GUID of the subsite.

<groupName>

Yes

The name of the group to add the user(s) to.

<users>

Yes

The data for each user, including:

  1. user/LoginName - The login name of the user.

  2. user/Name - (Optional) The name of the user to add.

  3. user/Email - (Optional) The E-mail address of the user.

  4. user/Notes - (Optional) The notes for the user.

Remarks

If the user does not already exist in the site, it will be created

Sample Code

Example XML Request

<request> 
   <procedure> 
      <execute namespace="SharePoint2007Provider" procedure="AddUsersToGroup" impersonate="1"> 
         <executeData> 
            <target>https://WSSFE:8080</target> 
            <siteGUID>a70398a3-eca5-407b-b749-a2497bb343a8</siteGUID> 
            <subSiteGUID>3724eba3-d8d0-4370-9af9-ff31bd7e1385</subSiteGUID> 
            <groupName>SPNSTestGroup</groupName> 
            <users> 
               <user loginName="Fabrikam\Administrator" email="Administrator@Fabrikam.Com" name="Administrator" /> 
            </users> 
         </executeData> 
      </execute> 
   </procedure> 
</request>

Applies To

SharePoint 2007 Provider for:

  • Hosted Messaging and Collaboration version 4.5

  • Hosted Messaging and Collaboration version 4.0

See also

Tasks

SharePoint2007Provider::RemoveUsersFromGroup