UserProfileService.RemoveMembership Method

Removes a membership for the specified account name.

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


<SoapDocumentMethodAttribute("", RequestNamespace := "",  _
    ResponseNamespace := "",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub RemoveMembership ( _
    accountName As String, _
    sourceInternal As Guid, _
    sourceReference As String _
Dim instance As UserProfileService
Dim accountName As String
Dim sourceInternal As Guid
Dim sourceReference As String

instance.RemoveMembership(accountName, _
    sourceInternal, sourceReference)
[SoapDocumentMethodAttribute("", RequestNamespace = "", 
    ResponseNamespace = "", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void RemoveMembership(
    string accountName,
    Guid sourceInternal,
    string sourceReference


  • 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.


Exception Condition

The membership cannot be removed.


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

See Also


UserProfileService Class

UserProfileService Members

UserProfileService Web Service