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

时间:2019-11-20 12:24:12

标签: azure azure-information-protection microsoft-information-protection

我已在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;
} 

在这里,我收到一个异常消息,提示“未配置合规性策略”(参见图片)。

我已经签入了租户AIP统一标签,并且保护已激活,并且与Office 365保护中心的敏感性标签保持同步。(如本answer中所建议)。

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

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个敏感度标签。

我想念什么?

enter image description here

1 个答案:

答案 0 :(得分:0)

您可以在Office 365安全和合规中心中向您的用户/组发布策略,也可以从Azure门户(Azure信息保护-统一标签/复制策略(预览))将AIP策略复制到S&CC。问题。

enter image description here