Share via


ProtectionPolicyManager.RequestAccessAsync Method

Definition

Overloads

RequestAccessAsync(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 an identity.

RequestAccessAsync(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 an identity.

RequestAccessAsync(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 an identity.

RequestAccessAsync(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 an identity

RequestAccessAsync(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 an identity.

public:
 static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessAsync(Platform::String ^ sourceIdentity, Platform::String ^ targetIdentity);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& targetIdentity);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Overload("RequestAccessAsync")]
 static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& targetIdentity);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(string sourceIdentity, string targetIdentity);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Overload("RequestAccessAsync")]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(string sourceIdentity, string targetIdentity);
function requestAccessAsync(sourceIdentity, targetIdentity)
Public Shared Function RequestAccessAsync (sourceIdentity As String, targetIdentity 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.

targetIdentity
String

Platform::String

winrt::hstring

The enterprise identity to which the content is being disclosed. This is an email address or domain.

Returns

A value of the ProtectionPolicyEvaluationResult enumeration that is the result of the request.

Attributes

Remarks

Call this method from the main UI thread of your foreground app.

See also

Applies to

RequestAccessAsync(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 an identity.

public:
 static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessAsync(Platform::String ^ sourceIdentity, Platform::String ^ targetIdentity, ProtectionPolicyAuditInfo ^ auditInfo);
/// [Windows.Foundation.Metadata.Overload("RequestAccessWithAuditingInfoAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& targetIdentity, ProtectionPolicyAuditInfo const& auditInfo);
[Windows.Foundation.Metadata.Overload("RequestAccessWithAuditingInfoAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(string sourceIdentity, string targetIdentity, ProtectionPolicyAuditInfo auditInfo);
function requestAccessAsync(sourceIdentity, targetIdentity, auditInfo)
Public Shared Function RequestAccessAsync (sourceIdentity As String, targetIdentity 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 should use IsIdentityManaged to confirm that an email address or domain is managed.

targetIdentity
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.

Returns

A value of the ProtectionPolicyEvaluationResult enumeration that is the result of the request.

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)

Remarks

Call this method from the main UI thread of your foreground app.

See also

Applies to

RequestAccessAsync(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 an identity.

public:
 static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessAsync(Platform::String ^ sourceIdentity, Platform::String ^ targetIdentity, ProtectionPolicyAuditInfo ^ auditInfo, Platform::String ^ messageFromApp);
/// [Windows.Foundation.Metadata.Overload("RequestAccessWithMessageAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& targetIdentity, ProtectionPolicyAuditInfo const& auditInfo, winrt::hstring const& messageFromApp);
[Windows.Foundation.Metadata.Overload("RequestAccessWithMessageAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(string sourceIdentity, string targetIdentity, ProtectionPolicyAuditInfo auditInfo, string messageFromApp);
function requestAccessAsync(sourceIdentity, targetIdentity, auditInfo, messageFromApp)
Public Shared Function RequestAccessAsync (sourceIdentity As String, targetIdentity 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.

targetIdentity
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 request.

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)

Remarks

Call this method from the main UI thread of your foreground app.

See also

Applies to

RequestAccessAsync(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 an identity

public:
 static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessAsync(Platform::String ^ sourceIdentity, Platform::String ^ targetIdentity, ProtectionPolicyAuditInfo ^ auditInfo, Platform::String ^ messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
/// [Windows.Foundation.Metadata.Overload("RequestAccessWithBehaviorAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(winrt::hstring const& sourceIdentity, winrt::hstring const& targetIdentity, ProtectionPolicyAuditInfo const& auditInfo, winrt::hstring const& messageFromApp, ProtectionPolicyRequestAccessBehavior const& behavior);
[Windows.Foundation.Metadata.Overload("RequestAccessWithBehaviorAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessAsync(string sourceIdentity, string targetIdentity, ProtectionPolicyAuditInfo auditInfo, string messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
function requestAccessAsync(sourceIdentity, targetIdentity, auditInfo, messageFromApp, behavior)
Public Shared Function RequestAccessAsync (sourceIdentity As String, targetIdentity 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.

targetIdentity
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.

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 request.

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

Call this method from the main UI thread of your foreground app.

Applies to