Share via


ProtectionPolicyManager.RequestAccessToFilesForAppAsync Method

Definition

Overloads

RequestAccessToFilesForAppAsync(IIterable<IStorageItem>, String, 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 specific app.

RequestAccessToFilesForAppAsync(IIterable<IStorageItem>, String, 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 specific app.

RequestAccessToFilesForAppAsync(IIterable<IStorageItem>, String, 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 specific app.

public:
 static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessToFilesForAppAsync(IIterable<IStorageItem ^> ^ sourceItemList, Platform::String ^ appPackageFamilyName, ProtectionPolicyAuditInfo ^ auditInfo);
/// [Windows.Foundation.Metadata.Overload("RequestAccessToFilesForAppAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForAppAsync(IIterable<IStorageItem> const& sourceItemList, winrt::hstring const& appPackageFamilyName, ProtectionPolicyAuditInfo const& auditInfo);
[Windows.Foundation.Metadata.Overload("RequestAccessToFilesForAppAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForAppAsync(IEnumerable<IStorageItem> sourceItemList, string appPackageFamilyName, ProtectionPolicyAuditInfo auditInfo);
function requestAccessToFilesForAppAsync(sourceItemList, appPackageFamilyName, auditInfo)
Public Shared Function RequestAccessToFilesForAppAsync (sourceItemList As IEnumerable(Of IStorageItem), appPackageFamilyName As String, auditInfo As ProtectionPolicyAuditInfo) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)

Parameters

sourceItemList

IIterable<IStorageItem>

IEnumerable<IStorageItem>

An array of files to that you want to grant access to.

appPackageFamilyName
String

Platform::String

winrt::hstring

The package name of the app that you want to grant 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

RequestAccessToFilesForAppAsync(IIterable<IStorageItem>, String, 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 specific app.

public:
 static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessToFilesForAppAsync(IIterable<IStorageItem ^> ^ sourceItemList, Platform::String ^ appPackageFamilyName, ProtectionPolicyAuditInfo ^ auditInfo, Platform::String ^ messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
/// [Windows.Foundation.Metadata.Overload("RequestAccessToFilesForAppWithMessageAndBehaviorAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForAppAsync(IIterable<IStorageItem> const& sourceItemList, winrt::hstring const& appPackageFamilyName, ProtectionPolicyAuditInfo const& auditInfo, winrt::hstring const& messageFromApp, ProtectionPolicyRequestAccessBehavior const& behavior);
[Windows.Foundation.Metadata.Overload("RequestAccessToFilesForAppWithMessageAndBehaviorAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForAppAsync(IEnumerable<IStorageItem> sourceItemList, string appPackageFamilyName, ProtectionPolicyAuditInfo auditInfo, string messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
function requestAccessToFilesForAppAsync(sourceItemList, appPackageFamilyName, auditInfo, messageFromApp, behavior)
Public Shared Function RequestAccessToFilesForAppAsync (sourceItemList As IEnumerable(Of IStorageItem), appPackageFamilyName As String, auditInfo As ProtectionPolicyAuditInfo, messageFromApp As String, behavior As ProtectionPolicyRequestAccessBehavior) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)

Parameters

sourceItemList

IIterable<IStorageItem>

IEnumerable<IStorageItem>

An array of files to that you want to grant access to.

appPackageFamilyName
String

Platform::String

winrt::hstring

The package name of the app 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.

behavior
ProtectionPolicyRequestAccessBehavior

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)

Applies to