Sensitive email leaves Microsoft 365 every day, and once it reaches an outside mailbox the sender's only lasting control is the protection that travels with the message. Microsoft Purview Message Encryption applies Azure Rights Management protection to email so that only intended recipients can read it, whether they use Outlook, Gmail, Yahoo or another service. This guide covers how the service authenticates internal and external recipients, the admin roles that control it, the mail flow rules, branding templates, expiration and revocation features of Advanced Message Encryption, and a hardening baseline you can apply in Exchange Online PowerShell. It is written for Microsoft 365 administrators, messaging engineers and security teams. Certificate based end-to-end email encryption is covered in the OpenPGP and S/MIME Email Encryption Guide; this page stays on the Purview service.
This is an independent guide from NHI Mgmt Group, based on Microsoft's public Purview Message Encryption documentation as of November 2026. It is not sponsored or reviewed by Microsoft. Product features change, so confirm settings against Microsoft's current documentation.
Key takeaways
- Confirm the foundation first. Message Encryption is activated automatically once the Azure Rights Management service is active; verify with
Get-IRMConfiguration(AzureRMSLicensingEnabled should be True) andTest-IRMConfiguration. - Pick the right protection per message. Encrypt-Only keeps the message encrypted but lets recipients forward, copy and print; Do Not Forward blocks forwarding, printing and copying and limits access to the original recipients.
- Mail flow rules make encryption automatic. Use Exchange transport rules (and Purview DLP actions) so that encryption does not depend on each user remembering to press Encrypt.
- Custom branding unlocks control. Expiration, revocation and portal activity tracking for external recipients all depend on a custom branding template that sends recipients through the encrypted message portal.
- Govern who can decrypt and revoke. Scope Compliance Administrator and Exchange Administrator roles tightly, and decide deliberately whether attachments stay encrypted after download.
How identity and access work in Purview Message Encryption
Purview Message Encryption is an online service built on the Azure Rights Management service, part of Microsoft Purview Information Protection. Protection is applied to the message (and to supported attachments), and every recipient must authenticate before the service issues a licence to read it. How that authentication happens depends on who the recipient is and which client they use.
| Recipient | Experience | How they authenticate | Revocable and expirable? |
|---|---|---|---|
| Microsoft 365 user in a supported Outlook client (Windows, Mac, iOS, Android, Outlook on the web) | Native inline reading, also across organisations | Their existing work or school sign-in | Only if a custom branding template forces the portal |
| Microsoft account user (for example outlook.com) | Native inline reading in supported clients | Microsoft account | Only if a custom branding template forces the portal |
| Gmail or Yahoo user | Wrapper email with a link to the encrypted message portal | Google or Yahoo credentials (social ID sign-in), or a one-time passcode | Yes, when sent with custom branding |
| Any other mail service or client | Encrypted message portal | One-time passcode sent to the recipient's address | Yes, when sent with custom branding |
Replies from recipients of an encrypted message are encrypted as well, so a conversation stays protected in both directions. Inbound mail from outside your Exchange Online organisation cannot be encrypted by your rules: it arrives as it was sent, even if a rule targets it.
Encryption options and what recipients can do
| Option | Recipients can | Recipients cannot | Attachments |
|---|---|---|---|
| Encrypt-Only | Read, reply, copy, print and forward (all usage rights except Save As, Export and Full Control) | Remove the encryption | Unencrypted Office documents are encrypted and inherit the same permissions; admins can choose to deliver them decrypted on download |
| Do Not Forward | Read and reply | Forward, print, copy, Save As, or add and change To, Cc and Bcc recipients | Unencrypted Office documents inherit Edit, Save, View and Allow Macros rights |
| Custom rights management template | What the template grants to its defined users and groups | What the template withholds | Protected according to the template |
The difference between Do Not Forward and a custom template without the Forward right matters: Do Not Forward limits access to the sender's chosen recipients, while a template uses a static list the administrator defined in advance, inside which people can still share content. To give an attachment different rights from the email, or to protect a file type that does not support inherited encryption, encrypt the file before attaching it. Setting Set-IRMConfiguration -EnablePdfEncryption $True extends protection to PDF attachments, which recipients then open in Microsoft Edge or the portal.
Admin roles and privileged access
Microsoft's documentation uses Compliance Administrator as the example role for configuring and testing Message Encryption, and recommends the role with the fewest permissions rather than Global Administrator. The actions below are the ones worth controlling.
| Action | Where | Role named in Microsoft documentation | Control to apply |
|---|---|---|---|
Verify and change IRM configuration (Get-IRMConfiguration, Set-IRMConfiguration, Test-IRMConfiguration) | Exchange Online PowerShell | Compliance Administrator | Change control; record before and after values |
Create, change and remove branding templates (New-OMEConfiguration, Set-OMEConfiguration, Remove-OMEConfiguration) | Exchange Online PowerShell | Compliance Administrator | Removal is permanent: export settings first |
| Create and edit encryption mail flow rules | Exchange admin center, Mail flow, Rules | Exchange administration permissions | Review every rule that uses the "Remove Office 365 Message Encryption" action |
| Revoke a message in the portal | Microsoft Purview portal, Encryption report | Compliance Administrator | Log the reason with the message ID |
Revoke a message in PowerShell (Set-OMEMessageRevocation) | Exchange Online PowerShell | Compliance Administrator or Exchange Administrator | Same as above |
Disable the service (Set-IRMConfiguration -AzureRMSLicensingEnabled $false) | Exchange Online PowerShell | Compliance Administrator | Alert on any change to this value |
Two settings deserve the same scrutiny as role assignments because they change who can read protected content. The first is any mail flow rule with the action Remove Office 365 Message Encryption and rights protection applied by the organization (or Remove attachment rights protection applied by the organization), which strips protection from matching mail. The second is DecryptAttachmentForEncryptOnly: when set to $true, the service sends Encrypt-Only attachments decrypted when downloaded from a browser. The default is $false. Make both a documented decision. For the wider admin model across the admin centres, see the Microsoft 365 admin centres and admin roles guide, and make privileged roles eligible rather than permanent as described in the Least Privilege Techniques Guide.
Integrations, API tokens and service accounts
Message Encryption touches several other parts of the mail path. Each integration below has a setting the customer owns.
- Mail flow rules: The core integration. In the Exchange admin center, go to Mail flow, Rules, New, Create a new rule; set a condition such as "The sender is located Inside the organization" plus a recipient, domain or keyword condition; then choose Modify the message security, Apply Office 365 Message Encryption and rights protection, and select Encrypt or Do Not Forward. In PowerShell,
New-TransportRuletakes-ApplyRightsProtectionTemplate(for example "Encrypt" or "Do Not Forward") and-ApplyRightsProtectionCustomizationTemplate(the branding template name). - Purview DLP: A DLP policy action can apply encryption when sensitive information types are detected, which is how Advanced Message Encryption's automatic policies identify personal, financial or health data. See the Data Loss Prevention (DLP) Guide.
- Sensitivity labels: A label configured for "Let users assign permissions" with Encrypt-Only gives users a labelled route to encryption in Outlook on Windows, macOS, iOS and Android.
- Hybrid Exchange: On-premises users get Message Encryption only when their mail routes through Exchange Online, so configure hybrid connectors first.
- Third-party mail processing: Applications that scan and modify mail can stop branding being applied correctly. Test branding end to end after adding any gateway or signature service to the outbound path.
- iOS Mail and other unenlightened apps:
Set-ActiveSyncOrganizationSettings -AllowRMSSupportForUnenlightenedApps $truelets the service send decrypted messages to apps such as iOS Mail. It is not enabled by default, and an OWA or ActiveSync mailbox policy withIRMEnabledset to$falseoverrides it. - Automation accounts: Scripts that manage branding templates, rules or revocation run against Exchange Online PowerShell. Run them under an app registration with certificate based authentication and only the Exchange roles they need, not a shared admin account, and review apps that hold mail permissions as described in How to review Microsoft 365 app registrations with mail permissions.
- Tenant keys: Microsoft-managed tenant root keys are the default and suit most organisations. If compliance needs bring your own key (BYOK), complete that before setting up Message Encryption. See the BYOK, HYOK and External Key Management Guide.
Branding, expiration and revocation with Advanced Message Encryption
Advanced Message Encryption builds on Message Encryption for organisations that need tighter control over what external recipients can do and for how long. Its capabilities are multiple branding templates, automatic policies that pair sensitive information detection with a template, message expiration, message revocation and encrypted message portal activity logs. Licensing is set out in the Microsoft Purview service description; confirm your plan there before designing around these features.
Branding templates
Every tenant has a default template, called "OME Configuration", that you can modify but not remove. Creating, modifying and removing additional templates requires Advanced Message Encryption. The main Set-OMEConfiguration parameters are:
| Parameter | Controls | Limit or format |
|---|---|---|
-Image | Logo in the email and portal | .png, .jpg, .bmp or .tiff; under 40 KB and 170x70 pixels is optimal |
-BackgroundColor | Background colour | #RRGGBB or a supported colour name |
-IntroductionText, -ReadButtonText, -EmailText, -DisclaimerText | Wrapper email text | Up to 1024 characters each |
-PortalText | Text at the top of the portal | Up to 128 characters |
-PrivacyStatementURL | Privacy Statement link | URL |
-OTPEnabled | One-time passcode sign-in to the portal | $true or $false |
-SocialIdSignIn | Sign-in with Microsoft, Google or Yahoo identities | $true or $false |
-ExternalMailExpiryInDays (on New-OMEConfiguration) | Days external recipients can access the message | 1 to 730 |
Apply a template with a mail flow rule whose action is Modify the message security, Apply custom branding to OME messages, and make sure the encryption rule runs at a higher priority than the branding rule.
Expiration
Create a template such as New-OMEConfiguration -Identity "Expire in 7 days" -ExternalMailExpiryInDays 7 and apply it with a mail flow rule. The expiry date appears in the wrapper email, and a recipient who opens an expired message sees an error in the portal. Expiration applies only to external recipients who read through the portal.
Revocation
Revocation works only for recipients who received the link-based, branded experience; Microsoft 365 and Microsoft account recipients who read inline in Outlook cannot be revoked. A sender can revoke from the Sent folder in Outlook on the web using Remove external access, but only for a message sent to a single recipient on the link-based experience. Administrators revoke with the message ID, found through Message trace or the Message encryption report in the Microsoft Purview portal:
- Check the message is revocable:
Get-OMEMessageStatus -MessageId "<message id>" | ft -a Subject, IsRevocable. - Revoke it:
Set-OMEMessageRevocation -Revoke $true -MessageId "<message id>", or choose Revoke message in the Encryption report details. - Confirm with
Get-OMEMessageStatusthat Revoked shows True. A recipient who opens it in the portal then sees that the message has been revoked by the sender.
To keep every external message revocable, apply encryption together with a custom branding template to all outgoing mail in scope.
Logging and detection
Encryption only helps if you can show it is being applied and spot when it is bypassed. Build monitoring around these sources.
- Message encryption report: In the Microsoft Purview portal, the Encryption report shows encrypted messages, their details and revocation status. Review it for volume trends by rule and for the share of external mail sent through the portal.
- Message trace: Message trace details show how a message was processed and give the message ID needed for revocation. See the Email Gateway and Message Trace Detection Guide.
- Portal activity logs: Advanced Message Encryption records access to encrypted messages through the portal, which lets you see whether and when an external recipient opened a message before you decide to revoke it.
- Configuration changes: Alert on changes to mail flow rules (especially new or edited rules with a remove encryption action), to IRM configuration values such as
AzureRMSLicensingEnabledandDecryptAttachmentForEncryptOnly, and to branding templates. Admin activity in Exchange Online is recorded in the audit log; forward it to your SIEM.
Metrics that show the programme is working:
- Percentage of outbound messages matching a sensitive information policy that were encrypted.
- Percentage of encrypted external mail sent with a custom branding template (and therefore revocable).
- Number of mail flow rules with a remove encryption action, each with a named owner and justification.
- Median time from a revocation request to confirmed revocation.
- Count of unapproved changes to IRM or OME configuration in the period (target zero).
Hardening baseline
Roll out in phases so that recipients and support teams are ready before encryption becomes automatic.
- Verify the service: Confirm Azure Rights Management is active,
AzureRMSLicensingEnabledis True andTest-IRMConfigurationpasses. If the test reports "Failed to acquire RMS templates", follow Microsoft's steps to set the licensing location fromGet-AipServiceConfiguration. Organisations still on AD RMS must migrate to Azure Rights Management first. - Retire legacy rules: Legacy Office 365 Message Encryption was deprecated on 1 July 2023. Edit each existing rule to use Apply Office 365 Message Encryption and rights protection with the Encrypt template and remove any Apply the previous version of OME action, otherwise recipients keep receiving the older HTML attachment format.
- Decide sign-in options: Choose whether external recipients may use social ID sign-in (
-SocialIdSignIn), one-time passcodes (-OTPEnabled) or both, per branding template, based on who your recipients are. - Decide attachment handling: Keep
DecryptAttachmentForEncryptOnlyat its default of$falseunless there is a documented need, and turn onEnablePdfEncryptionso PDF attachments are protected. - Build branding templates: Create a default branded template and, where Advanced Message Encryption is licensed, templates with expiry periods that match your retention needs (for example 7, 30 or 90 days).
- Pilot rules: Start with a narrow rule (a test group of senders, or one partner domain) and test each recipient type from the identity table, including Gmail, Yahoo and a one-time passcode recipient. Check replies are encrypted.
- Expand with DLP: Add DLP policies that encrypt mail containing sensitive information types, then rules for keywords such as "[secure]" in the subject if users need a manual trigger.
- Roll back safely: To back out a rule, disable it rather than delete it. To disable the service entirely, remove rules that use Message Encryption, turn off the Encrypt button, then set
AzureRMSLicensingEnabledto$false.
Choosing the right approach for your organisation:
| Situation | Recommended approach |
|---|---|
| Small organisation, occasional sensitive mail | Encrypt button and Encrypt-Only, one keyword rule, default branding |
| Regulated data sent to customers or patients | DLP-driven encryption, custom branding with an expiry period, portal forced for external recipients so mail can be revoked |
| Confidential internal or board material | Do Not Forward or a custom template, applied by sensitivity label |
| Need for signature and encryption under the sender's own certificate | S/MIME, covered in the OpenPGP and S/MIME Email Encryption Guide |
Common misconfigurations
- Expecting revocation without branding: Revocation and expiration only work for link-based portal delivery. Without a custom branding template applied by rule, many external messages are delivered inline and cannot be revoked. Apply branding to the mail you may need to pull back.
- Rule order reversed: If the branding rule runs before the encryption rule, branding may not apply. Give the encryption rule the higher priority.
- Unreviewed remove encryption rules: A rule created to fix one partner's workflow can quietly decrypt far more mail than intended. Scope it to named recipients and review it each quarter.
- Attachment decryption switched on without a decision: Setting
DecryptAttachmentForEncryptOnlyto$truemeans downloaded attachments leave protection behind. Record why, or keep the default. - Broad admin roles for routine tasks: Using Global Administrator to run branding or revocation work widens the impact of a compromised account. Use Compliance Administrator, made eligible through privileged access processes, and service principals for automation.
Framework mapping
| Control area | NIST SP 800-53 Rev 5 | NIST CSF 2.0 | ISO/IEC 27001:2022 Annex A |
|---|---|---|---|
| Encrypting mail in transit and at rest with the recipient | SC-8, SC-13 | PR.DS-02 | A.8.24 Use of cryptography |
| Tenant key management and BYOK | SC-12 | PR.DS-01 | A.8.24 Use of cryptography |
| Usage rights (Do Not Forward, templates) and admin roles | AC-3, AC-6 | PR.AA-05 | A.5.15 Access control, A.8.2 Privileged access rights |
| Rules for sending information to external parties | AC-3 | PR.DS-02 | A.5.14 Information transfer |
| Encryption reports, audit logging and change alerts | AU-2, AU-6 | DE.CM-09 | A.8.15 Logging |
Practitioner checklist
- Confirm Azure Rights Management is active,
AzureRMSLicensingEnabledis True andTest-IRMConfigurationpasses. - Migrate every rule that uses Apply the previous version of OME to the current encryption action.
- Document when staff should use Encrypt-Only, Do Not Forward or a custom template.
- Create a custom branding template with a clear disclaimer and privacy link, and decide social ID and one-time passcode sign-in.
- Apply branding (and an expiry period where licensed) to external mail you may need to revoke, with the encryption rule at higher priority.
- Drive encryption from DLP policies for sensitive information types, not only from user choice.
- Keep
DecryptAttachmentForEncryptOnlyat$falseunless justified, and enableEnablePdfEncryption. - List every rule with a remove encryption action, with an owner and review date.
- Assign Compliance Administrator on an eligible basis and run automation under certificate authenticated app registrations.
- Rehearse a revocation with
Get-OMEMessageStatusandSet-OMEMessageRevocation, and alert on changes to IRM and OME configuration.
Standards and references
- Microsoft Learn: Microsoft Purview Message Encryption
- Microsoft Learn: Microsoft Purview Advanced Message Encryption
- Microsoft Learn: Set up Microsoft Purview Message Encryption
- Microsoft Learn: Define mail flow rules to encrypt email messages
- Microsoft Learn: Manage Message Encryption
- Microsoft Learn: Add your organization's brand to encrypted messages
- Microsoft Learn: Revoke email encrypted by Advanced Message Encryption
- Microsoft Learn: Configure usage rights for Azure Information Protection
Related NHI Mgmt Group resources: OpenPGP and S/MIME Email Encryption Guide · Exchange Online Security Guide · Microsoft Purview Information Protection Guide · Email Security Guide · Data Loss Prevention (DLP) Guide