Windows-based Hosting::AddUsersToSharepointSiteRole
Note
Do not use this procedure at this time. This procedure is reserved for future use.
Add a user to a Windows SharePoint Services site.
Arguments
Input Arguments | Description |
---|---|
<orgLdapPath> |
The possible vpath 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 cross-site group that the user is to be added. |
<roleName> |
A string that contains the name of the site group to add the user to. |
<usersXmlString> |
Data for each user containing:
|
<preferredDomainController> |
The name of the preferred domain controller. |
<sendCredentials> |
Remarks
Method Syntax
public string AddUsersToSharepointSiteRole(
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.AddUserToSharepointSiteRole(orgLdapPath, webSiteName, target, roleName, usersXmlString, preferredDomainController, true);
// set the response XML to match the return from MPF
responseXml.LoadXml(response);
this.mpsResponse.Document = responseXml;
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