Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 3.15 KB

filerevocationmanager_protectasync_1331169532.md

File metadata and controls

52 lines (31 loc) · 3.15 KB
-api-id -api-type
M:Windows.Security.EnterpriseData.FileRevocationManager.ProtectAsync(Windows.Storage.IStorageItem,System.String)
winrt method

Windows.Security.EnterpriseData.FileRevocationManager.ProtectAsync

-description

Note

Starting in July 2022, Microsoft is deprecating Windows Information Protection (WIP) and the APIs that support WIP. Microsoft will continue to support WIP on supported versions of Windows. New versions of Windows won't include new capabilities for WIP, and it won't be supported in future versions of Windows. For more information, see Announcing sunset of Windows Information Protection.

For your data protection needs, Microsoft recommends that you use Microsoft Purview Information Protection and Microsoft Purview Data Loss Prevention. Purview simplifies the configuration set-up and provides an advanced set of capabilities.

Note

FileRevocationManager may be unavailable for releases after Windows 10. Instead, use FileProtectionManager.

Protects a file or folder for selective wipe.

-parameters

-param storageItem

The file or folder to protect for selective wipe.

-param enterpriseIdentity

The enterprise id that the file or folder is protected for. The enterpriseIdentity value must be formatted as an Internationalized Domain Name (IDN) and cannot contain spaces. For example, contoso.com.

-returns

An asynchronous operation that retrieves the selective wipe protection status for the storageItem.

-remarks

You can use the ProtectAsync method to protect a file or folder using Selective Wipe. This identifies the file as protected for your enterprise identifier, such as "example.com", as shown in the previous code example. If you protect a folder using the ProtectAsync method, then all files in that folder inherit the same protection.

[!code-csharp_Global]

[!code-csharp_Protect]

The ProtectAsync method requires exclusive access to the file or folder being encrypted, and will fail if another process is using has a handle open to the file or folder.

-examples

-see-also

FileRevocationManager sample, How to protect files with Selective Wipe (C#/VB/C++)