Skip to main content

key-management

Applies to:
Office 365 Customer KeyAzure Key VaultDuoKey MPC

Key Lifecycle Overview​

Customer Keys in Office 365 follow a specific lifecycle:

1

Generation

Keys are created using DuoKey with MPC technology.

2

Import

Keys are imported into Azure Key Vault.

3

Active Use

Keys encrypt data in Office 365 workloads.

4

Rotation

Keys are periodically rotated for security.

5

Retirement

Old keys are archived but retained for decryption.

6

Deletion

Keys are permanently deleted after retention period.

Managing Data Encryption Policies (DEPs)​

View All DEPs​

# Connect to Exchange Online
Connect-ExchangeOnline

# List all DEPs
Get-M365DataAtRestEncryptionPolicy |
Select-Object Name, Description, State, AssignedCount |
Format-Table -AutoSize

View DEP Details​

# Get detailed information about a specific DEP
Get-M365DataAtRestEncryptionPolicy -Identity "DEP-Prod-Mailboxes" |
Format-List *

# View key URIs associated with DEP
Get-M365DataAtRestEncryptionPolicy -Identity "DEP-Prod-Mailboxes" |
Select-Object -ExpandProperty AzureKeyIDs

Key Rotation​

When to Rotate Keys​

Key Rotation Triggers

Rotate your Customer Keys when:

  • Following your organization's key rotation policy (typically annually)
  • After a security incident or suspected compromise
  • When personnel with key access leave the organization
  • As part of compliance requirements
  • After major system upgrades

Key Rotation Process​

1

Generate New Keys

Generate new primary and secondary keys using DuoKey MPC and export for BYOK import.

2

Import New Keys to Azure Key Vault

Import the new keys to your Azure Key Vaults using Add-AzKeyVaultKey.

3

Update DEP with New Keys

Use Set-M365DataAtRestEncryptionPolicy to update the DEP with new key URIs.

4

Monitor Re-encryption

Monitor re-encryption progress using Get-M365DataAtRestEncryptionPolicyAssignment.

5

Archive Old Keys

After successful rotation, disable old keys in Key Vault (do not delete immediately).

Do Not Delete Old Keys

Always archive old keys rather than deleting them. Old keys may still be needed to decrypt previously encrypted data.

Rotation Timeline​

PhaseDurationActivities
Planning1 weekGenerate new keys, test import
Implementation1-2 daysUpdate DEPs with new keys
Re-encryption3-7 daysOffice 365 re-encrypts data
Verification1 weekMonitor and validate encryption
CleanupOngoingArchive old keys after retention period

Key Backup and Recovery​

Backup Best Practices​

Frequency

Backup keys immediately after creation and rotation.

Storage

Store backups in secure, offline location with strong encryption.

Redundancy

Maintain backups in multiple geographic locations.

Testing

Regularly test backup restoration procedures.

Retention

Retain backups per compliance requirements (typically 7 years).

Access Control

Limit backup access to authorized personnel only.

Key Revocation​

Emergency Key Revocation​

Emergency Key Revocation

Key revocation is an emergency procedure. It will immediately prevent Microsoft 365 from accessing encrypted data, causing a complete service disruption for affected users.

Impact of Key Revocation​

ImpactDescription
ImmediateMicrosoft 365 cannot access encrypted data
User ImpactUsers cannot access their mailboxes, files, or Teams data
DurationLasts until keys are restored or new DEP assigned
RecoveryRestore keys or create new DEP to regain access

Managing Mailbox Assignments​

DEP Removal

Removing a DEP assignment does not decrypt existing data. Previously encrypted data remains encrypted with the original DEP. Only new data will use default Microsoft encryption.

Maintenance Schedule​

FrequencyTasks
DailyMonitor DEP health status, check for encryption failures, review key access logs
WeeklyReview key operation metrics, validate backup integrity, check mailbox encryption progress, review audit logs
MonthlyGenerate compliance reports, review and update access policies, test key recovery procedures, update documentation
QuarterlyConduct key rotation (if required), comprehensive security review, disaster recovery testing, staff training refresh
AnnualMajor key rotation, complete compliance audit, review and update procedures, update business continuity plans

Support and Resources​

For assistance with key management operations: