UserProfileService.UpdateMembershipPrivacy method
Updates the membership privacy for the specified account name.
Namespace: WebSvcUserProfileService
Assembly: UserProfileServices (in UserProfileServices.dll)
Syntax
'Declaration
<SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/UserProfileService/UpdateMembershipPrivacy", RequestNamespace := "https://microsoft.com/webservices/SharePointPortalServer/UserProfileService", _
ResponseNamespace := "https://microsoft.com/webservices/SharePointPortalServer/UserProfileService", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub UpdateMembershipPrivacy ( _
accountName As String, _
sourceInternal As Guid, _
sourceReference As String, _
newPrivacy As Privacy _
)
'Usage
Dim instance As UserProfileService
Dim accountName As String
Dim sourceInternal As Guid
Dim sourceReference As String
Dim newPrivacy As Privacy
instance.UpdateMembershipPrivacy(accountName, _
sourceInternal, sourceReference, _
newPrivacy)
[SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/UserProfileService/UpdateMembershipPrivacy", RequestNamespace = "https://microsoft.com/webservices/SharePointPortalServer/UserProfileService",
ResponseNamespace = "https://microsoft.com/webservices/SharePointPortalServer/UserProfileService",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void UpdateMembershipPrivacy(
string accountName,
Guid sourceInternal,
string sourceReference,
Privacy newPrivacy
)
Parameters
accountName
Type: System.StringThe account name of the user.
sourceInternal
Type: System.GuidThe GUID for the member group of the membership to update.
sourceReference
Type: System.StringThe source reference for the member group of the membership to update.
newPrivacy
Type: WebSvcUserProfileService.PrivacyThe new privacy policy.
Exceptions
Exception | Condition |
---|---|
SoapException | The membership privacy cannot be updated. |
Remarks
This method updates the privacy of the membership specified by the sourceInternal and sourceReference parameters for the user specified by the accountName parameter.