Share via


Windows-based Hosting::RemoveUsersFromSharepointSiteRole

Note

Do not use this procedure at this time. This procedure is reserved for future use.

Remove users from a Windows SharePoint Services site role.

Arguments

Input Arguments Description

<orgLdapPath>

The Lightweight Directory Access Protocol (LDAP) path of the organization that will own the Web site.

<siteName>

The site name which is unique within org and stored in the pointer. OR,

<target>

The SharePoint site containing the role that the group is to be removed from.

<roleName>

A string that contains the name of the site group.

<usersXmlString>

Data for each user containing:

  • <userPrincipalName>: Used to get the user name (DOMAIN\User_Alias) of the user.

<preferredDomainController>

The name of the preferred domain controller.

<sendCredentials>

Remarks

Method Syntax

public string   RemoveUsersFromSharepointSiteRole( 
                string orgLdapPath, 
                string siteName,  
                string target, 
                string roleName, 
                string usersXmlString, 
                string preferredDomainController, 
                bool sendCredentials) 

Sample Code

Example XML Request

No example XML request.

Example XML Response

No example XML response.

Typical C# Usage

        //Get user name and password.                            
        string userName = this.Request.ServerVariables.Get("AUTH_USER"); 
        string pass = this.Request.ServerVariables.Get("AUTH_PASSWORD"); 
        //Set credentials. 
        objWS.PreAuthenticate = true; 
        objWS.Credentials = new NetworkCredential(userName,pass); 
 
        lblMsg.InnerHtml = mpsResponseHeaderLabel; 
        //Display response. 
        this.mpsResponse.DocumentSource = ""; 
        response = objWS.DeleteUserFromSharepointSiteRole(orgLdapPath, webSiteName, target, roleName, usersXmlString, preferredDomainController, true); 
                         
// set the response XML to match the return from MPF 
        responseXml.LoadXml(response); 
        this.mpsResponse.Document = responseXml; 
lblDone.InnerText = successMsg; 

Applies To

Managed Windows-based Hosting Web Service for:

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

  • Windows-based Hosting version 4.5

  • Windows-based Hosting version 4.0

  • Windows-based Hosting version 3.5

  • Windows-based Hosting for Applications version 1.0

See also

Tasks

Windows-based Hosting::AddUsersToSharepointSiteRole