UserProfileService.RemoveMembership Method

Removes a membership for the specified account name.

Namespace:  [UserProfileService Web service]
Web service reference: http://Site/_vti_bin/UserProfileService.asmx

Syntax

'Declaration
<SoapDocumentMethodAttribute("http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/RemoveMembership", RequestNamespace := "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService",  _
    ResponseNamespace := "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub RemoveMembership ( _
    accountName As String, _
    sourceInternal As Guid, _
    sourceReference As String _
)
'Usage
Dim instance As UserProfileService
Dim accountName As String
Dim sourceInternal As Guid
Dim sourceReference As String

instance.RemoveMembership(accountName, _
    sourceInternal, sourceReference)
[SoapDocumentMethodAttribute("http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/RemoveMembership", RequestNamespace = "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService", 
    ResponseNamespace = "http://microsoft.com/webservices/SharePointPortalServer/UserProfileService", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void RemoveMembership(
    string accountName,
    Guid sourceInternal,
    string sourceReference
)

Parameters

  • sourceInternal
    Type: System.Guid

    The GUID for the member group for which the membership is removed.

  • sourceReference
    Type: System.String

    The unique reference for the member group of the membership to be removed.

Exceptions

Exception Condition
SoapException

The membership cannot be removed.

Remarks

This method deletes the membership from the member group specified by the sourceInternal and sourceReference parameters for the specified user.

See Also

Reference

UserProfileService Class

UserProfileService Members

UserProfileService Web Service