Export (0) Print
Expand All

UserProfileService.AddMembership method

Adds the specified account name as a new member of the specified group.

Namespace:  WebSvcUserProfileService
Assembly:  UserProfileServices (in UserProfileServices.dll)

[SoapDocumentMethodAttribute("http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/AddMembership", RequestNamespace = "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService", 
	ResponseNamespace = "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService", 
	Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public MembershipData AddMembership(
	string accountName,
	MembershipData membershipInfo,
	string group,
	Privacy privacy
)

Parameters

accountName
Type: System.String

The account name of the user to add to the group.

membershipInfo
Type: WebSvcUserProfileService.MembershipData

The information about the membership.

group
Type: System.String

The name of the group to which the user is added.

privacy
Type: WebSvcUserProfileService.Privacy

The privacy level of the group.

Return value

Type: WebSvcUserProfileService.MembershipData
Information about the new membership.

ExceptionCondition
SoapException

The link cannot be added.

This method creates a new membership with the specified information for the user specified by the accountName parameter, and returns the information about the newly added membership.

Community Additions

ADD
Show:
© 2014 Microsoft