获取敏感度标签错误 - 未配置合规性策略:缺少 <policy> 标签

Get sensitivity labels error - Compliance policy not configured: missing <policy> tag

在 Azure aip 中,我创建了一个应用程序,获得了所有必需的权限和管理员同意,如 MIP sdk 中所述 prerequisite section

这是根据 sdk 创建文件引擎的代码。

public static IFileEngine CreateFileEngine(Identity identity)
{
            // If the profile hasn't been created, do that first. 
            if (profile == null)
            {
                profile = CreateFileProfile(appInfo, ref authDelegate);
            }

            // Create file settings object. Passing in empty string for the first parameter, engine ID, will cause the SDK to generate a GUID.
            // Locale settings are supported and should be provided based on the machine locale, particular for client applications.
            var engineSettings = new FileEngineSettings("", "", "en-US")
            {
                // Provide the identity for service discovery.
                Identity = identity
            };

            // Add the IFileEngine to the profile and return.
            var engine = Task.Run(async () => await profile.AddEngineAsync(engineSettings)).Result;

            return engine;
} 

这里我收到一个异常 "Compliance policy not configured"(见图片)。

我已经检查了租户 AIP 统一标签和保护已激活,它与 office 365 保护中心的敏感标签同步。(如本中推荐)。

我是租户的全局管理员,令牌是使用我的凭据生成的。

public string AcquireToken(Identity identity, string authority, string resource, string claims)
{
            AuthenticationContext authContext = new AuthenticationContext(authority);
            string clientSecret = ConfigurationManager.AppSettings["ida:ClientSecret"]?.ToString();
            //var clientCred = new ClientCredential(AppInfo.ApplicationId, clientSecret);
            var result = Task.Run(async () => await authContext.AcquireTokenAsync(resource, AppInfo.ApplicationId, new Uri(redirectUri), new PlatformParameters(PromptBehavior.Always))).Result;
            //var result = authContext.AcquireTokenAsync(resource, clientCred).Result;
            return result.AccessToken;
 }

我也在 aip 上发布了 4/5 敏感度标签。

我错过了什么?

您可以将 Office 365 安全与合规中心中的策略发布到您的 users/groups,或者将您的 AIP 策略从 Azure 门户复制到 S&CC(Azure 信息保护 - 统一标签/复制策略(预览版) 。这应该可以解决问题。