ProtectionPolicyManager.RequestAccessForAppAsync 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
RequestAccessForAppAsync(String, 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. Request access to enterprise-protected content for a specific target app. |
RequestAccessForAppAsync(String, String, ProtectionPolicyAuditInfo, String) |
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. Request access to enterprise-protected content for a specific target app. |
RequestAccessForAppAsync(String, 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. Request access to enterprise-protected content for a specific target app. |
RequestAccessForAppAsync(String, String) |
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. Request access to enterprise-protected content for a specific target app. |
RequestAccessForAppAsync(String, 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.
Request access to enterprise-protected content for a specific target app.
public:
static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessForAppAsync(Platform::String ^ sourceIdentity, Platform::String ^ appPackageFamilyName, ProtectionPolicyAuditInfo ^ auditInfo, Platform::String ^ messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
/// [Windows.Foundation.Metadata.Overload("RequestAccessForAppWithBehaviorAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& appPackageFamilyName, ProtectionPolicyAuditInfo const& auditInfo, winrt::hstring const& messageFromApp, ProtectionPolicyRequestAccessBehavior const& behavior);
[Windows.Foundation.Metadata.Overload("RequestAccessForAppWithBehaviorAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(string sourceIdentity, string appPackageFamilyName, ProtectionPolicyAuditInfo auditInfo, string messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
function requestAccessForAppAsync(sourceIdentity, appPackageFamilyName, auditInfo, messageFromApp, behavior)
Public Shared Function RequestAccessForAppAsync (sourceIdentity As String, appPackageFamilyName As String, auditInfo As ProtectionPolicyAuditInfo, messageFromApp As String, behavior As ProtectionPolicyRequestAccessBehavior) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)
Parameters
- sourceIdentity
-
String
Platform::String
winrt::hstring
The enterprise identity to which the content is protected. This is an email address or domain that is managed.
- appPackageFamilyName
-
String
Platform::String
winrt::hstring
The enterprise identity to which the content is being disclosed. This is an email address or domain.
- 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 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)
|
Applies to
RequestAccessForAppAsync(String, String, ProtectionPolicyAuditInfo, String)
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.
Request access to enterprise-protected content for a specific target app.
public:
static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessForAppAsync(Platform::String ^ sourceIdentity, Platform::String ^ appPackageFamilyName, ProtectionPolicyAuditInfo ^ auditInfo, Platform::String ^ messageFromApp);
/// [Windows.Foundation.Metadata.Overload("RequestAccessForAppWithMessageAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& appPackageFamilyName, ProtectionPolicyAuditInfo const& auditInfo, winrt::hstring const& messageFromApp);
[Windows.Foundation.Metadata.Overload("RequestAccessForAppWithMessageAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(string sourceIdentity, string appPackageFamilyName, ProtectionPolicyAuditInfo auditInfo, string messageFromApp);
function requestAccessForAppAsync(sourceIdentity, appPackageFamilyName, auditInfo, messageFromApp)
Public Shared Function RequestAccessForAppAsync (sourceIdentity As String, appPackageFamilyName As String, auditInfo As ProtectionPolicyAuditInfo, messageFromApp As String) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)
Parameters
- sourceIdentity
-
String
Platform::String
winrt::hstring
The enterprise identity to which the content is protected. This is an email address or domain that is managed. Your app should use IsIdentityManaged to confirm that an email address or domain is managed.
- appPackageFamilyName
-
String
Platform::String
winrt::hstring
The enterprise identity to which the content is being disclosed. This is an email address or domain.
- 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 so that the user can make a consent decision.
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.14393.0)
Windows Mobile Extension SDK (introduced in 10.0.14393.0) |
API contract |
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced in v3.0)
|
See also
- RequestAccessForAppAsync(String, String, ProtectionPolicyAuditInfo)
- RequestAccessForAppAsync(String, String)
Applies to
RequestAccessForAppAsync(String, 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.
Request access to enterprise-protected content for a specific target app.
public:
static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessForAppAsync(Platform::String ^ sourceIdentity, Platform::String ^ appPackageFamilyName, ProtectionPolicyAuditInfo ^ auditInfo);
/// [Windows.Foundation.Metadata.Overload("RequestAccessForAppWithAuditingInfoAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& appPackageFamilyName, ProtectionPolicyAuditInfo const& auditInfo);
[Windows.Foundation.Metadata.Overload("RequestAccessForAppWithAuditingInfoAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(string sourceIdentity, string appPackageFamilyName, ProtectionPolicyAuditInfo auditInfo);
function requestAccessForAppAsync(sourceIdentity, appPackageFamilyName, auditInfo)
Public Shared Function RequestAccessForAppAsync (sourceIdentity As String, appPackageFamilyName As String, auditInfo As ProtectionPolicyAuditInfo) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)
Parameters
- sourceIdentity
-
String
Platform::String
winrt::hstring
The enterprise identity to which the content is protected. This is an email address or domain that is managed. Your app can use IsIdentityManaged to confirm that an email address or domain is managed.
- appPackageFamilyName
-
String
Platform::String
winrt::hstring
The description of the App package family name.
- 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.14393.0)
Windows Mobile Extension SDK (introduced in 10.0.14393.0) |
API contract |
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced in v3.0)
|
See also
- RequestAccessForAppAsync(String, String, ProtectionPolicyAuditInfo, String)
- RequestAccessForAppAsync(String, String)
Applies to
RequestAccessForAppAsync(String, String)
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.
Request access to enterprise-protected content for a specific target app.
public:
static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessForAppAsync(Platform::String ^ sourceIdentity, Platform::String ^ appPackageFamilyName);
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& appPackageFamilyName);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Overload("RequestAccessForAppAsync")]
static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& appPackageFamilyName);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(string sourceIdentity, string appPackageFamilyName);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Overload("RequestAccessForAppAsync")]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessForAppAsync(string sourceIdentity, string appPackageFamilyName);
function requestAccessForAppAsync(sourceIdentity, appPackageFamilyName)
Public Shared Function RequestAccessForAppAsync (sourceIdentity As String, appPackageFamilyName As String) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)
Parameters
- sourceIdentity
-
String
Platform::String
winrt::hstring
The enterprise identity to which the content is protected. This is an email address or domain that is managed. Your app can use IsIdentityManaged to confirm that an email address or domain is managed.
- appPackageFamilyName
-
String
Platform::String
winrt::hstring
The description of the App package family name.
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.10586.0)
Windows Mobile Extension SDK (introduced in 10.0.10586.0) |
API contract |
Windows.Security.EnterpriseData.EnterpriseDataContract (introduced in v2.0)
|
See also
- RequestAccessForAppAsync(String, String, ProtectionPolicyAuditInfo)
- RequestAccessForAppAsync(String, String, ProtectionPolicyAuditInfo, String)