Delen via


UserPolicy.CreateAsync method

Create a custom protection policy.

Syntax

public:
static UserPolicy^ CreateAsync(
  PolicyDescriptor^ policyDescriptor, 
  String^ userId, 
  IAuthenticationCallback^ authenticationCallback, 
  UserPolicyCreationOptions options
)

Parameters

policyDescriptor

Type: PolicyDescriptor

a PolicyDescriptor object which defines the policy.

userId

Type: String

The email address of the user that is protecting the content.

This email address will be used to discover the RMS service instance (either ADRMS server or Azure RMS) that the user's organization is using. This parameter is also used as a hint for userId for user authentication, i.e., it will be passed to the IAuthenticationCallback.GetTokenAsync() in the AuthenticationParameters structure.

authenticationCallback

Type: IAuthenticationCallback

Authentication callback to be used for authentication.

options

Type: UserPolicyCreationOptions

Options for creating protection policy object. For more information, see UserPolicyCreationOptions.

Return value

Type: UserPolicy

A UserPolicy object.

Requirements

Minimum supported client
None supported
Minimum supported server
None supported
Minimum supported phone
Windows Phone 8.1
Namespace
Microsoft::RightsManagement
Metadata
Microsoft.RightsManagement.winmd

See also

UserPolicy