UserProfileService.RemoveMembership method

Removes a membership for the specified account name.

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

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/UserProfileService/RemoveMembership", RequestNamespace := "https://microsoft.com/webservices/SharePointPortalServer/UserProfileService",  _
    ResponseNamespace := "https://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("https://microsoft.com/webservices/SharePointPortalServer/UserProfileService/RemoveMembership", RequestNamespace = "https://microsoft.com/webservices/SharePointPortalServer/UserProfileService", 
    ResponseNamespace = "https://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

WebSvcUserProfileService namespace