Manuallly upgrade existing DKIM keys from 1024-bit to 2048-bit

Connect to Exchange online using powershell

Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline

Upgrade key to 2048-bit

Rotate-DkimSigningConfig -KeySize 2048 -Identity {domain name}

Example

Rotate-DkimSigningConfig -KeySize 2048 -Identity productivv.be

Result

Get-DkimSigningConfig -identity productivv.be | Select Selector1KeySize

This new 2048-bit key takes effect on the RotateOnDate, and will send emails with the 1024-bit key in the interim. After four days, you can test again with the 2048-bit key (that is, once the rotation takes effect to the second selector).

Get-DkimSigningConfig -identity productivv.be | Select RotateOnDate

Sources:

Connect to Exchange Online PowerShell | Microsoft Learn