Share via


UserProfileService.AddMembership Method

Adds a membership for the specified account name.

Namespace:  websvcUserProfileService
Assembly:  MOSSSOAP (in MOSSSOAP.dll)

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/UserProfileService/AddMembership", RequestNamespace := "https://microsoft.com/webservices/SharePointPortalServer/UserProfileService",  _
    ResponseNamespace := "https://microsoft.com/webservices/SharePointPortalServer/UserProfileService",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function AddMembership ( _
    accountName As String, _
    membershipInfo As MembershipData, _
    group As String, _
    privacy As Privacy _
) As MembershipData
'Usage
Dim instance As UserProfileService
Dim accountName As String
Dim membershipInfo As MembershipData
Dim group As String
Dim privacy As Privacy
Dim returnValue As MembershipData

returnValue = instance.AddMembership(accountName, _
    membershipInfo, group, privacy)
[SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/UserProfileService/AddMembership", RequestNamespace = "https://microsoft.com/webservices/SharePointPortalServer/UserProfileService", 
    ResponseNamespace = "https://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
    Account name of the user to add a membership to.

Return Value

Type: websvcUserProfileService.MembershipData
A MembershipData object that represents the newly added membership.

See Also

Reference

UserProfileService Class

UserProfileService Members

websvcUserProfileService Namespace