Get the visual marking (such as header of footer) information for the Azure Information Protection Label

半腔热情 提交于 2021-02-11 05:09:26

问题


It is not possible for me with the given protection functions, to protect a document (pdf, docx) in a way that it shows the visual marking defined in the azure portal.

By using the Microsoft Information Protection (MIP) SDK I'm able to read the labels and protect documents in accordance. If I Set the visual marking in the azure portal for 'footer' 'header' or 'watermark' and save it and publish it, the generated documents by applying the label with protection doesn't show the header,footer or watermark information in the protected document. Even if I print out, no header, footer or watermark is shown. How need the protection here be done, in order that the visual markings are show in the document how it was defined in the azure portal? Is there a way to read the 'visual marking' information out of the label information?

Get the labels by using Microsoft.InformationProtection.File

labels = engine.SensitivityLabels;

Protect the documents with

        handler = CreateFileHandler(options,options.InputFileStream);

        // Use the SetLabel method on the handler, providing label ID and LabelingOptions
        // The handler already references a file, so those details aren't needed.
        handler.SetLabel(options.LabelId, labelingOptions);

        // The change isn't committed to the file referenced by the handler until CommitAsync() is called.
        // Pass the desired output file name in to the CommitAsync() function.

           var result = Task.Run(async () => await handler.CommitAsync(options.OutputFileStream)).Result;
      //  var result = await handler.CommitAsync(options.OutputFileStream);
        options.FileName = handler.OutputFileName;

The protection works, but no visual markings are shown in the protected document as it would be expected

I would expect that the protected documents have the header, footer, watermark information as defined for the label in the azure portal.


回答1:


I'm on the MIP SDK team at Microsoft.

While we do support writing file protection and MIP label metadata, we don't support writing the content marking in the SDK today.

When you use the SDK to apply the label to an Office document, the next time that document is opened and saved in Office, the content marking will be applied. This is also possible with PDF, but depends upon the consuming application being MIP aware.

We may look at this in the future, but for now we don't have plans to add more than what is listed above (apply at save with AIP client).

If you'd like to submit feedback on this, head to UserVoice and submit an idea!




回答2:


It takes some time for changes to reflect. Also, if you are using O365 make sure you set the changes in the O365 Security and Compliance Center Link



来源:https://stackoverflow.com/questions/57589567/get-the-visual-marking-such-as-header-of-footer-information-for-the-azure-info

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!