All ideas that relate to Azure Information Protection (AIP)

Expose labels as document properties for use in customs headers

All organisations I've worked for use document templates (mostly Word) with headers full of tables. In those tables the document metadata is shown, such as title, page numbers, document tracking ID etc. One piece of metadata is the classification label. To avoid having to set that label manually, it would be excellent to be able to extract the AIP label from metadata, and the format it in the usual way.

It is usually not an option to use the markings feature of AIP, since it then looks like a two-year-old prepared the document. The headers are in the wrong place or completely broken etc.

1 vote
Sign in
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

Fredrik shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

This is already possible!
Just insert a field code in the document header, with the following value:{DOCPROPERTY Sensitivity}
See for a handy guide into how to use custom document properties in a field code.
“Sensitivity” is the most useful field for a case like what is described in this request, but all other AIP field codes (prefixed with MSIP_Label) can be used as well.


Sign in
Password icon
Signed in as (Sign out)
  • Fredrik commented  ·   ·  Flag as inappropriate

    Ok, in Word for Mac preview:
    - Create blank document, choose a sensitivity in the ribbon.
    - Try to insert { DOCPROPERTY "Sensitivity" \* MERGEFORMAT }, observe that it's missing
    - Insert a field { DOCPROPERTY "MSIP_Label_f7f2737a-24d1-aaaa-b72a-edd50cccca33_Name" \* MERGEFORMAT }, which shows the sensitivity which happens to coincide with the label name
    - Change the sensitivity in the ribbon, update field, observe "Error! Unknown document property name."
    - Insert field { DOCPROPERTY "MSIP_Label_27058dc3-87c8-aaaa-ba86-2760e599a521_Name" \* MERGEFORMAT }, observer that the label name is display, not the intended sensitivity marking.

    Doing the same tests in Word I see the Sensitivity property, but the GUID still changes from label to label. Though on that machine I don't seem to be running the preview. There I have the full AIP set of labels, not just the ones I've published in Unified Labels.

  • I don't think your last observation is correct. The GUID in the document properties doesn't change with the label, it changes with the tenant. So within an organization, it is a constant string.
    E.g. you could use the following DocProperty:
    To show the name of the label that's applied to a document.
    I'll pass feedback along that the Sensitivity DocProperty is not showing on Mac.

  • Fredrik commented  ·   ·  Flag as inappropriate

    Confirmed it just now: creating a new document in Word (preview) on MacOS, the Sensitivity docproperty is not available. Only the GUID-named label properties are there, and none of those contain the actual label. One of them contains the label name, but that is not necessarily the same.

    And it's not really workable, since the GUID names change with the label.

    The best thing would be to expose this outside DocProperty, in Document Information.

  • Fredrik commented  ·   ·  Flag as inappropriate

    Hmm, did not work when trying it today after migrating to unified labels. Tried it on MacOS, I should probably add.

Feedback and Knowledge Base