Share via


ProtectionPolicyManager.CheckAccess(String, String) 方法

定义

注意

从 2022 年 7 月开始,Microsoft 将弃用 Windows 信息保护 (WIP) 和支持 WIP 的 API。 Microsoft 将继续在受支持的 Windows 版本上支持 WIP。 新版本的 Windows 不包括 WIP 的新功能,并且将来的 Windows 版本将不受支持。 有关详细信息,请参阅宣布 Windows 信息保护停用

对于数据保护需求,Microsoft 建议使用Microsoft Purview 信息保护Microsoft Purview 数据丢失防护。 Purview 简化了配置设置,并提供一组高级功能。

请求标识是否可以访问企业保护的内容。

public:
 static ProtectionPolicyEvaluationResult CheckAccess(Platform::String ^ sourceIdentity, Platform::String ^ targetIdentity);
 static ProtectionPolicyEvaluationResult CheckAccess(winrt::hstring const& sourceIdentity, winrt::hstring const& targetIdentity);
public static ProtectionPolicyEvaluationResult CheckAccess(string sourceIdentity, string targetIdentity);
function checkAccess(sourceIdentity, targetIdentity)
Public Shared Function CheckAccess (sourceIdentity As String, targetIdentity As String) As ProtectionPolicyEvaluationResult

参数

sourceIdentity
String

Platform::String

winrt::hstring

应用的源企业标识。 这是托管的电子邮件地址或域。 如果托管电子邮件地址或域,应用应使用 IsIdentityManaged 来检查。

targetIdentity
String

Platform::String

winrt::hstring

要检查的企业标识有权访问受保护的内容。

返回

作为查询结果的 ProtectionPolicyEvaluationResult 枚举的值。

Windows 要求

应用功能
enterpriseDataPolicy

适用于