Share via


PrivacyPolicyManager.CreatePrivacyPolicy Method

Creates a privacy policy.

Namespace:  Microsoft.Office.Server.UserProfiles
Assembly:  Microsoft.Office.Server (in Microsoft.Office.Server.dll)

Syntax

'Declaration
Public Function CreatePrivacyPolicy ( _
    displayName As String, _
    group As String, _
    policy As PrivacyPolicy, _
    defaultPrivacy As Privacy, _
    canUserOverridePrivacy As Boolean _
) As PrivacyPolicyItem
'Usage
Dim instance As PrivacyPolicyManager
Dim displayName As String
Dim group As String
Dim policy As PrivacyPolicy
Dim defaultPrivacy As Privacy
Dim canUserOverridePrivacy As Boolean
Dim returnValue As PrivacyPolicyItem

returnValue = instance.CreatePrivacyPolicy(displayName, _
    group, policy, defaultPrivacy, canUserOverridePrivacy)
public PrivacyPolicyItem CreatePrivacyPolicy(
    string displayName,
    string group,
    PrivacyPolicy policy,
    Privacy defaultPrivacy,
    bool canUserOverridePrivacy
)

Parameters

  • displayName
    Type: System.String
    The display name for the new privacy policy.
  • group
    Type: System.String
    The group that the new privacy policy belongs to.
  • canUserOverridePrivacy
    Type: System.Boolean
    Sets whether a user can override the privacy policy.

Return Value

Type: Microsoft.Office.Server.UserProfiles.PrivacyPolicyItem
The PrivacyItem object.

Remarks

For more information about privacy policies, see Privacy Policies. For a code example about how to set the privacy policy of a property, see How to: Set Privacy Policies for User Profile Properties.

See Also

Reference

PrivacyPolicyManager Class

PrivacyPolicyManager Members

Microsoft.Office.Server.UserProfiles Namespace