Step-By-Step: Setup and Enablement of Office 365 Message Encryption

Office 365 Message Encryption is an online service which is built on Microsoft Azure Rights Management (Azure RMS) offering. With Azure RMS set up for an organization, administrators can enable message encryption by defining transport rules that determine the conditions for encryption. A rule can require the encryption of all messages addressed to a specific recipient, for example.

When a user sends an email message in Exchange Online that matches an encryption rule, the message is sent out with an HTML attachment. The recipient opens the HTML attachment in the email message, recognizes a familiar brand if that’s present, and follows the embedded instructions to view the encrypted message on the Office 365 Message Encryption portal. The recipient can choose to view the message by signing in with a Microsoft account or a work account associated with Office 365, or by using a one-time passcode. Both options help ensure that only the intended recipient can view the encrypted message.

The following diagram summarizes the passage of an email message through the encryption and decryption process.

Diagram showing the path of an encrypted email


The process to setup and enable Office 365 Message Encryption is really easy. There are three main steps that need to be followed

  1. Activate Azure Rights Management
  2. Setup Azure Rights Management for Exchange Online
  3. Setup transport rules to enforce message encryption in Exchange Online

The steps to enable this are as follows: 

Step 1: Activate Azure Rights Management for Office 365 Message Encryption

  1. Login to Microsoft Online Portal with a Global Admin Account
  2. Open the App Launcher (waffle)
  3. Select Admin
  4. Select SERVICE SETTINGS from the left pane
  5. Click Rights Management
  6. From within RIGHTS MANAGEMENT click Manage
  7. On the management page, click Activate
  8. Click Activate again on the popup asking if you are sure you want to activate Rights Management

Step 2: Set up Azure Rights Management for Office 365 Message Encryption

The next steps are completed via connecting to Exchange Online with PowerShell

  1. Open PowerShell as Administrator

  2. Enter the following commands to connect and import the session
    Set-ExecutionPolicy RemoteSigned
    $cred = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $cred -Authentication Basic –AllowRedirection
    Import-PSSession $Session

  3. Verify your IRM isn’t configured already

  4. Configure RMS with the online key-sharing location for Exchange Online with PowerShell (locations below). For my example I am using North America, but the table below shows all the locations
    Set-IRMConfiguration -RMSOnlineKeySharingLocation


    RMS key sharing location

    North America

    European Union


    South America

    Office 365 for Government

  5. Import the Trusted Publishing Domain (TPD) from RMS Online
    Import-RMSTrustedPublishingDomain -RMSOnline -name "RMS Online" clip_image018

  6. Verify successful setup of IRM in Exchange Online
    Test-IRMConfiguration –sender

  7. Disable IRM templates in OWA and Outlook
    Set-IRMConfiguration -ClientAccessServerEnabled $false

  8. Enable IRM for Office 365 Message Encryption
    Set-IRMConfiguration -InternalLicensingEnabled $true
    NOTE: You shouldn’t see that warning, but if you do it’s safe to ignore. I got it because I ran the command and forgot to grab the screen shot before clearing the screen, thus I had to run the command again.

  9. View the IRM Configuration

Step 3: Create Transport Rules to Encrypt Messages

  1. Open the Office 365 Admin Portal (
  2. Open Exchange Admin Center
  3. Click Mail Flow
  4. Click the + and create your transport rule. I have created two simple rules.
  5. This rule will encrypt anything that is sent external with an attachment larger than 1MB
    NOTE: This rule will encrypt the email if the word ‘Encrypt’ is in the subject line of the email. This will give the users (once trained) the flexibility to encrypt emails they deem sensitive.
  6. Make sure the rules are active and test
  7. Testing that the transport rule apply Office 365 Message Encryption
    Testing Transport Rule 1
    Testing Transport Rule 2
    When the user gets the email, this is how its presented to them