7. Automatic labelling
Published 10 November 2026
This guidance is part of a series for UK government departments on how to set up Microsoft Information Protection to align with the requirements of the Government Security Classification Policy (GSCP). This section explains automatic labelling.
7.1. Summary
When an email is sent to another organisation, the sensitivity label applied by the sender is not automatically applied in the recipient organisation’s M365 environment. When the recipient replies to or forwards an email, they may be prompted to apply an equivalent label manually to maintain the original classification. Although this action may take only a short time for each message, repeated manual labelling can create unnecessary effort and introduce risk in inconsistent classification. This policy must be applied in both the sending and receiving M365 environments. It is a bi-directional policy to improve the overall user experience:
-
A DLP policy marks the outbound email meta data with the associated sensitivity label, providing the benefit to the recipient organisation
-
Upon receipt of an email with the correctly marked meta-data, an auto-labelling policy in the recipient organisation applies the associated sensitivity label, providing benefit to their users.
To improve cross-organisation classification, a Data Loss Prevention (DLP) policy can be used to write the sender’s applied classification into the outbound email metadata. The receiving organisation’s M365 environment can then use an auto-labelling policy to detect this metadata value and apply the equivalent sensitivity label automatically. This reduces the need for users to manually label replies or forwarded messages and helps maintain consistent classification between organisations.
7.2. Prerequisites
Auto-labelling is dependent on Purview Audit being enabled. To enable Audit, follow the instructions in this Microsoft Purview Audit article
7.3. Policy Creation Overview
This section details the process for creating a Data Loss Prevention (DLP) policy in Purview, named ‘Email - Header Classification Marking’, targeted at Exchange outbound emails.
Only the classifications that do not use encryption can be used for Automatic labelling. These consist of:
- Official - For Public Release
- Official
- Official - HMG Use Only
- Official - Embargoed
- Official-Sensitive
- Official-Sensitive - HMG Use Only
- Official-Sensitive - Embargoed
7.4. Header Marking Policy Configuration
The tables below detail the configuration steps for creating a single DLP policy and individual rules nested within the policy for each of the labels required to be configured.
Portal – Purview Admin Centre – Data Loss Prevention - Policies
| DLP policy item | Configuration | Action |
|---|---|---|
| Template | Choose a template | Custom policy |
| Name your DLP policy | Name | Email Header Classification Marking |
| Name your DLP policy | Description | Adds the classification marking to the email header to support Auto Apply labelling |
| Choose were to apply the policy | Policy scope | Exchange email |
| Customised advanced DLP rules | Advanced DLP rules | Create rule (create an individual rule for each header marking, follow the instructions below) |
| Rule item | Configuration | Action |
|---|---|---|
| Name | Name your rule | Header – Official – For Public Release |
| Conditions | Content contains | Sensitivity Label = OFFICIAL – For Public Release |
| Conditions | AND Grouping | Toggle NOT |
| Conditions | Header Matches Pattern | Classification: HMG=OFFICIAL-FOR PUBLIC RELEASE |
| Actions | Set headers | Classification: HMG= OFFICIAL-FOR PUBLIC RELEASE |
| User notifications | Use notifications to inform your users and help educate them on the proper use of sensitive info | Off |
| Incident reports | Send an alert to admins when a rule match occurs | Off |
| Incident reports | Use email incident reports to notify you when a policy match occurs. | Off |
| Additional options | Evaluate rule per component | Off |
| Rule item | Configuration | Action |
|---|---|---|
| Name | Name your rule | Header – Official |
| Conditions | Content contains | Sensitivity Label = OFFICIAL |
| Conditions | AND Grouping | Toggle NOT |
| Conditions | Header Matches Pattern | Classification: HMG=OFFICIAL |
| Actions | Set headers | Classification: HMG= OFFICIAL |
| User notifications | Use notifications to inform your users and help educate them on the proper use of sensitive info | Off |
| Incident reports | Send an alert to admins when a rule match occurs | Off |
| Incident reports | Use email incident reports to notify you when a policy match occurs. | Off |
| Additional options | Evaluate rule per component | Off |
| Rule item | Configuration | Action |
|---|---|---|
| Name | Name your rule | Header – Official – HMG Use Only |
| Conditions | Content contains | Sensitivity Label = OFFICIAL-HMG USE ONLY |
| Conditions | AND Grouping | Toggle NOT |
| Conditions | Header Matches Pattern | Classification: HMG= OFFICIAL-HMG USE ONLY |
| Actions | Set headers | Classification: HMG= OFFICIAL-HMG USE ONLY |
| User notifications | Use notifications to inform your users and help educate them on the proper use of sensitive info | Off |
| Incident reports | Send an alert to admins when a rule match occurs | Off |
| Incident reports | Use email incident reports to notify you when a policy match occurs. | Off |
| Additional options | Evaluate rule per component | Off |
| Rule item | Configuration | Action |
|---|---|---|
| Name | Name your rule | Header – Official – Embargoed |
| Conditions | Content contains | Sensitivity Label = OFFICIAL-EMBARGOED |
| Conditions | AND Grouping | Toggle NOT |
| Conditions | Header Matches Pattern | Classification: HMG= OFFICIAL-EMBARGOED |
| Actions | Set headers | Classification: HMG= OFFICIAL-EMBARGOED |
| User notifications | Use notifications to inform your users and help educate them on the proper use of sensitive info | Off |
| Incident reports | Send an alert to admins when a rule match occurs | Off |
| Incident reports | Use email incident reports to notify you when a policy match occurs. | Off |
| Additional options | Evaluate rule per component | Off |
| Rule item | Configuration | Action |
|---|---|---|
| Name | Name your rule | Header – Official-Sensitive |
| Conditions | Content contains | Sensitivity Label = OFFICIAL- SENSITIVE |
| Conditions | AND Grouping | Toggle NOT |
| Conditions | Header Matches Pattern | Classification: HMG= OFFICIAL-SENSITIVE |
| Actions | Set headers | Classification: HMG= OFFICIAL-SENSITIVE |
| User notifications | Use notifications to inform your users and help educate them on the proper use of sensitive info | Off |
| Incident reports | Send an alert to admins when a rule match occurs | Off |
| Incident reports | Use email incident reports to notify you when a policy match occurs. | Off |
| Additional options | Evaluate rule per component | Off |
| Rule item | Configuration | Action |
|---|---|---|
| Name | Name your rule | Header – Official-Sensitive – HMG Use Only |
| Conditions | Content contains | Sensitivity Label = OFFICIAL-SENSITIVE-HMG USE ONLY |
| Conditions | AND Grouping | Toggle NOT |
| Conditions | Header Matches Pattern | Classification: HMG= OFFICIAL-SENSITIVE-HMG USE ONLY |
| Actions | Set headers | Classification: HMG= OFFICIAL-SENSITIVE-HMG USE ONLY |
| User notifications | Use notifications to inform your users and help educate them on the proper use of sensitive info | Off |
| Incident reports | Send an alert to admins when a rule match occurs | Off |
| Incident reports | Use email incident reports to notify you when a policy match occurs. | Off |
| Additional options | Evaluate rule per component | Off |
| Rule item | Configuration | Action |
|---|---|---|
| Name | Name your rule | Header – Official-Sensitive – Embargoed |
| Conditions | Content contains | Sensitivity Label = OFFICIAL-SENSITIVE- EMBARGOED |
| Conditions | AND Grouping | Toggle NOT |
| Conditions | Header Matches Pattern | Classification: HMG= OFFICIAL-SENSITIVE- EMBARGOED |
| Actions | Set headers | Classification: HMG= OFFICIAL-SENSITIVE- EMBARGOED |
| User notifications | Use notifications to inform your users and help educate them on the proper use of sensitive info | Off |
| Incident reports | Send an alert to admins when a rule match occurs | Off |
| Incident reports | Use email incident reports to notify you when a policy match occurs. | Off |
| Additional options | Evaluate rule per component | Off |
NB: The policy can be switched on immediately or placed in simulation mode.
7.5. Auto Apply Labelling Policy Configuration
Upon receipt of an email, the below auto labelling policies will read the email header, as defined in the previous configuration, and automatically assign the equivalent sensitivity label.
It is advised to run these policies initially in simulation mode for testing before turning on. The successful result should be the correct sensitivity label is automatically applied to an email when it is replied to or forwarded on.
Portal: Purview Admin Centre - Information Protection - Policies - Auto-labelling policies
| Policy item | Configuration | Action |
|---|---|---|
| Name your auto-labelling policy | Name | Email Auto Apply Label – Official – For Public Release policy |
| Choose a label to auto-apply | Label to auto-apply | Official – For Public Release |
| Choose locations where you want to apply the label | Location | Exchange email |
| Create rules for Exchange email | Create rule | New rule |
| Edit rule | Rule Name | Email Auto Apply Label – Official – For Public Release rule |
| Add condition | Select | Header matches patterns |
| Add condition | Header name | Classification |
| Add condition | Regular expression | ^HMG=OFFICIAL\s-\sFOR\s+PUBLIC\s+RELEASE$ |
| Additional label settings | Emails only | Ticked |
| Decide if you want to test out the policy now or later | Deploy | Run in simulation mode to gather metrics or switch the policy on |
| Policy item | Configuration | Action |
|---|---|---|
| Name your auto-labelling policy | Name | Email Auto Apply Label – Official policy |
| Choose a label to auto-apply | Label to auto-apply | Official |
| Choose locations where you want to apply the label | Location | Exchange email |
| Create rules for Exchange email | Create rule | New rule |
| Edit rule | Rule Name | Email Auto Apply Label – Official rule |
| Add condition | Select | Header matches patterns |
| Add condition | Header name | Classification |
| Add condition | Regular expression | ^HMG=OFFICIAL$ |
| Additional label settings | Emails only | Ticked |
| Decide if you want to test out the policy now or later | Deploy | Run in simulation mode to gather metrics or switch the policy on |
| Policy item | Configuration | Action |
|---|---|---|
| Name your auto-labelling policy | Name | Email Auto Apply Label – Official – HMG Use Only policy |
| Choose a label to auto-apply | Label to auto-apply | Official – HMG Use Only |
| Choose locations where you want to apply the label | Location | Exchange email |
| Create rules for Exchange email | Create rule | New rule |
| Edit rule | Rule Name | Email Auto Apply Label – Official – HMG Use Only rule |
| Add condition | Select | Header matches patterns |
| Add condition | Header name | Classification |
| Add condition | Regular expression | ^HMG=OFFICIAL\s-\sHMG\s+USE\s+ONLY$ |
| Additional label settings | Emails only | Ticked |
| Decide if you want to test out the policy now or later | Deploy | Run in simulation mode to gather metrics or switch the policy on |
| Policy item | Configuration | Action |
|---|---|---|
| Name your auto-labelling policy | Name | Email Auto Apply Label – Official – Embargoed policy |
| Choose a label to auto-apply | Label to auto-apply | Official – Embargoed |
| Choose locations where you want to apply the label | Location | Exchange email |
| Create rules for Exchange email | Create rule | New rule |
| Edit rule | Rule Name | Email Auto Apply Label – Official – Embargoed rule |
| Add condition | Select | Header matches patterns |
| Add condition | Header name | Classification |
| Add condition | Regular expression | ^HMG=OFFICIAL\s-\sEMBARGOED$ |
| Additional label settings | Emails only | Ticked |
| Decide if you want to test out the policy now or later | Deploy | Run in simulation mode to gather metrics or switch the policy on |
| Policy item | Configuration | Action |
|---|---|---|
| Name your auto-labelling policy | Name | Email Auto Apply Label – Official-Sensitive policy |
| Choose a label to auto-apply | Label to auto-apply | Official-Sensitive |
| Choose locations where you want to apply the label | Location | Exchange email |
| Create rules for Exchange email | Create rule | New rule |
| Edit rule | Rule Name | Email Auto Apply Label – Official-Sensitive rule |
| Add condition | Select | Header matches patterns |
| Add condition | Header name | Classification |
| Add condition | Regular expression | ^HMG= OFFICIAL-SENSITIVE$ |
| Additional label settings | Emails only | Ticked |
| Decide if you want to test out the policy now or later | Deploy | Run in simulation mode to gather metrics or switch the policy on |
| Policy item | Configuration | Action |
|---|---|---|
| Name your auto-labelling policy | Name | Email Auto Apply Label – Official-Sensitive – HMG Use Only policy |
| Choose a label to auto-apply | Label to auto-apply | Official-Sensitive – HMG Use Only |
| Choose locations where you want to apply the label | Location | Exchange email |
| Create rules for Exchange email | Create rule | New rule |
| Edit rule | Rule Name | Email Auto Apply Label – Official-Sensitive – HMG Use Only rule |
| Add condition | Select | Header matches patterns |
| Add condition | Header name | Classification |
| Add condition | Regular expression | ^HMG=OFFICIAL-SENSITIVE\s-\sHMG\s+USE\s+ONLY$ |
| Additional label settings | Emails only | Ticked |
| Decide if you want to test out the policy now or later | Deploy | Run in simulation mode to gather metrics or switch the policy on |
| Policy item | Configuration | Action |
|---|---|---|
| Name your auto-labelling policy | Name | Email Auto Apply Label – Official-Sensitive – Embargoed policy |
| Choose a label to auto-apply | Label to auto-apply | Official-Sensitive – Embargoed |
| Choose locations where you want to apply the label | Location | Exchange email |
| Create rules for Exchange email | Create rule | New rule |
| Edit rule | Rule Name | Email Auto Apply Label – Official-Sensitive – Embargoed rule |
| Add condition | Select | Header matches patterns |
| Add condition | Header name | Classification |
| Add condition | Regular expression | ^HMG=OFFICIAL-SENSITIVE\s-\sEMBARGOED$ |
| Additional label settings | Emails only | Ticked |
| Decide if you want to test out the policy now or later | Deploy | Run in simulation mode to gather metrics or switch the policy on |
Previous - Data loss prevention controls configuration guidance.
Next - Holding labels guidance.