PrivacyPolicyManager.CreatePrivacyPolicy Method
NOTE: This API is now obsolete.
Creates a privacy policy.
Namespace: Microsoft.Office.Server.UserProfiles
Assembly: Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)
Syntax
'Declaration
<ObsoleteAttribute("This method is no longer supported.")> _
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)
[ObsoleteAttribute("This method is no longer supported.")]
public PrivacyPolicyItem CreatePrivacyPolicy(
string displayName,
string group,
PrivacyPolicy policy,
Privacy defaultPrivacy,
bool canUserOverridePrivacy
)
Parameters
displayName
Type: System.StringThe display name for the new privacy policy.
group
Type: System.StringThe group that the new privacy policy belongs to.
policy
Type: Microsoft.Office.Server.UserProfiles.PrivacyPolicyThe privacy policy of the new policy.
defaultPrivacy
Type: Microsoft.Office.Server.UserProfiles.PrivacyThe default privacy setting of the new privacy policy.
canUserOverridePrivacy
Type: System.BooleanSets 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 and Writing Policy-Compliant Code. For a code example about how to set the privacy policy of a property, see How to: Set Privacy Policies for User Profile Properties.