How to Fix Unable to Create DKIM Keys in Microsoft 365 Exchange Online
Question details
The user is unable to create DKIM keys for a verified domain and receives an 'Error in retrieving encrypted key' message.

- Product
- Microsoft 365 Exchange Online
- Device & OS
- not provided
- Scenario
- Attempting to create a DKIM configuration using New-DkimSigningConfig in PowerShell or via the Microsoft Defender portal.
- Observed behavior
- The domain appears correctly in Get-AcceptedDomain, but DKIM key creation fails with an 'Error in retrieving encrypted key' prompt.
Ensure you have Exchange Administrator or Global Administrator privileges in your Microsoft 365 tenant before attempting to modify DKIM configurations.
Verify Domain and Submit a Support Request
Since this error involves backend encryption services and sensitive tenant data, it requires intervention from the Microsoft 365 support team after verifying standard settings.
The 'Error in retrieving encrypted key' issue usually indicates a synchronization problem or a backend encryption provisioning failure within Exchange Online. Because this deals with secure tenant data, public forums cannot resolve it, and Microsoft Support must address it remotely.
Run the 'Get-AcceptedDomain' command in Exchange Online PowerShell to ensure your domain is fully configured and accepted.
Run the 'New-DkimSigningConfig' command again to see if the error was a temporary glitch.
Log in to the Microsoft 365 admin center and navigate to the 'Support' or 'Help & support' section.
Create a new support ticket detailing the 'Error in retrieving encrypted key' message. Request the backend team to investigate your domain's DNS configuration and encryption services.

Need a Reliable Alternative for Your Daily Office Tasks? Try WPS Office
While advanced Exchange Online administration requires Microsoft 365 tools, managing your everyday documents, spreadsheets, and presentations shouldn't be complicated. WPS Office provides a lightweight, highly compatible, and free alternative to standard Microsoft Office applications.
- 1. Download the installer: Visit the official WPS Office website and click the Free Download button.
- 2. Install the software: Run the downloaded installer and follow the quick setup wizard to install the suite on your device.
- 3. Start creating and editing: Open WPS Office to immediately start working on your documents, spreadsheets, and presentations with full format compatibility.

Frequently Asked Questions
Why do I get the 'Error in retrieving encrypted key' message when setting up DKIM?
This error typically occurs due to a backend synchronization issue in Exchange Online where the encryption keys fail to provision properly for your tenant. It usually requires Microsoft Support to refresh or reset the background services.
Can I fix this DKIM error without contacting Microsoft Support?
Generally, no. Since the issue involves backend encryption services and sensitive tenant data, it cannot be fixed via standard PowerShell commands or the Defender portal UI once the accepted domain check has passed.
What permissions do I need to create DKIM keys in Exchange Online?
You need to be a member of the Organization Management or Security Administrator role groups in Microsoft 365 to run the New-DkimSigningConfig command and manage DKIM settings.
How long does DKIM take to propagate once successfully configured?
After the keys are successfully generated and the CNAME records are added to your DNS provider, it can take anywhere from a few hours up to 48 hours for the DNS changes to fully propagate globally.




