ProtectionPolicyManager.RequestAccessToFilesForProcessAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RequestAccessToFilesForProcessAsync(IIterable<IStorageItem>, UInt32, ProtectionPolicyAuditInfo) |
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. Requests access to enterprise-protected content for a process of an app. |
RequestAccessToFilesForProcessAsync(IIterable<IStorageItem>, UInt32, ProtectionPolicyAuditInfo, String, ProtectionPolicyRequestAccessBehavior) |
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. Requests access to enterprise-protected content for a process of an app. |
RequestAccessToFilesForProcessAsync(IIterable<IStorageItem>, UInt32, ProtectionPolicyAuditInfo)
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.
Requests access to enterprise-protected content for a process of an app.
public:
static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessToFilesForProcessAsync(IIterable<IStorageItem ^> ^ sourceItemList, unsigned int processId, ProtectionPolicyAuditInfo ^ auditInfo);
/// [Windows.Foundation.Metadata.Overload("RequestAccessToFilesForProcessAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IIterable<IStorageItem> const& sourceItemList, uint32_t const& processId, ProtectionPolicyAuditInfo const& auditInfo);
[Windows.Foundation.Metadata.Overload("RequestAccessToFilesForProcessAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IEnumerable<IStorageItem> sourceItemList, uint processId, ProtectionPolicyAuditInfo auditInfo);
function requestAccessToFilesForProcessAsync(sourceItemList, processId, auditInfo)
Public Shared Function RequestAccessToFilesForProcessAsync (sourceItemList As IEnumerable(Of IStorageItem), processId As UInteger, auditInfo As ProtectionPolicyAuditInfo) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)
Parameters
- sourceItemList
An array of files to that you want to grant access to.
- processId
-
UInt32
unsigned int
uint32_t
The process id of the process that you want to grant the permission to.
- auditInfo
- ProtectionPolicyAuditInfo
An audit info object; an instance of ProtectionPolicyAuditInfo.
Returns
A value of the ProtectionPolicyEvaluationResult enumeration that is the result of the query.
- Attributes
Windows requirements
Device family |
Windows Desktop Extension SDK (introduced in 10.0.15063.0)
Windows Mobile Extension SDK (introduced in 10.0.15063.0) |
API contract |
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced in v4.0)
|
Applies to
RequestAccessToFilesForProcessAsync(IIterable<IStorageItem>, UInt32, ProtectionPolicyAuditInfo, String, ProtectionPolicyRequestAccessBehavior)
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.
Requests access to enterprise-protected content for a process of an app.
public:
static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessToFilesForProcessAsync(IIterable<IStorageItem ^> ^ sourceItemList, unsigned int processId, ProtectionPolicyAuditInfo ^ auditInfo, Platform::String ^ messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
/// [Windows.Foundation.Metadata.Overload("RequestAccessToFilesForProcessWithMessageAndBehaviorAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IIterable<IStorageItem> const& sourceItemList, uint32_t const& processId, ProtectionPolicyAuditInfo const& auditInfo, winrt::hstring const& messageFromApp, ProtectionPolicyRequestAccessBehavior const& behavior);
[Windows.Foundation.Metadata.Overload("RequestAccessToFilesForProcessWithMessageAndBehaviorAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IEnumerable<IStorageItem> sourceItemList, uint processId, ProtectionPolicyAuditInfo auditInfo, string messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
function requestAccessToFilesForProcessAsync(sourceItemList, processId, auditInfo, messageFromApp, behavior)
Public Shared Function RequestAccessToFilesForProcessAsync (sourceItemList As IEnumerable(Of IStorageItem), processId As UInteger, auditInfo As ProtectionPolicyAuditInfo, messageFromApp As String, behavior As ProtectionPolicyRequestAccessBehavior) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)
Parameters
- sourceItemList
An array of files to that you want to grant access to.
- processId
-
UInt32
unsigned int
uint32_t
The process id of the process that you want to grant the permission to.
- auditInfo
- ProtectionPolicyAuditInfo
An audit info object; an instance of ProtectionPolicyAuditInfo.
- messageFromApp
-
String
Platform::String
winrt::hstring
A message that will be displayed in the consent dialog box so that the user can make a consent decision.
A constant that defines how you would like to override default policy behavior.
Returns
A value of the ProtectionPolicyEvaluationResult enumeration that is the result of the query.
- Attributes
Windows requirements
Device family |
Windows Desktop Extension SDK (introduced in 10.0.15063.0)
Windows Mobile Extension SDK (introduced in 10.0.15063.0) |
API contract |
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced in v4.0)
|
Remarks
Use this method to temporarily grant access of a protected file to a process that can only access unprotected files.