FileProtectionManager.ProtectAsync(IStorageItem, String) FileProtectionManager.ProtectAsync(IStorageItem, String) FileProtectionManager.ProtectAsync(IStorageItem, String) FileProtectionManager.ProtectAsync(IStorageItem, String) FileProtectionManager.ProtectAsync(IStorageItem, String) Method

Definition

Note

Windows Information Protection (WIP) policy cannot be applied on Windows 10, version 1511 (build 10586) or earlier.

Protect the data in a file to an enterprise identity. The app can then use standard API to read or write from the file.

public : static IAsyncOperation<FileProtectionInfo> ProtectAsync(IStorageItem target, Platform::String identity)
static IAsyncOperation<FileProtectionInfo> ProtectAsync(IStorageItem target, winrt::hstring identity) const;
public static IAsyncOperation<FileProtectionInfo> ProtectAsync(IStorageItem target, String identity)
Public Shared Function ProtectAsync(target As IStorageItem, identity As String) As IAsyncOperation(Of FileProtectionInfo)
Windows.Security.EnterpriseData.FileProtectionManager.protectAsync(target, identity).done( /* Your success and error handlers */ );

Parameters

target
IStorageItem IStorageItem IStorageItem

The file to be protected.

identity
String String String

The enterprise identity. This is an email address or domain that is managed. Use ProtectionPolicyManager.IsIdentityManaged to confirm that an email address or domain is managed before using the identity to protect a file.

Returns

When the call to this method completes successfully, it returns a FileProtectionInfo object that contains the status of the newly protected file.

Additional features and requirements

Capabilities
enterpriseDataPolicy

See also