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.
- membershipInfo
Type: websvcUserProfileService.MembershipData
Membership information.
- group
Type: System.String
Group to add the membership to.
- privacy
Type: websvcUserProfileService.Privacy
Privacy policy of the membership.
Return Value
Type: websvcUserProfileService.MembershipData
A MembershipData object that represents the newly added membership.