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

適用於