Contents

EntraID Cloud Connect Key Rollover

Warning
This article was last updated on September 25, 2024, the content may be out of date.

Firstly, Microsoft has provided a helpful and straightforward guide on this process. This article serves to reinforce the fact that updating the Single Sign-On (SSO) decryption key isn’t as scary as it might seem. Keeping your environment up to date is crucial for maintaining security, and updating the SSO key is one of those tasks that shouldn’t be overlooked.

To get started, we’re going to need a few things in place:

The Azure AD module allows us to interact with Azure Active Directory using PowerShell. Here’s how you can install it:

Install-Module AzureAD -Scope CurrentUser
Import-Module AzureAD -Scope CurrentUser

It’s best to perform this on the server where Azure AD/EntraID Connect Sync is installed, as this will save time when we need to work with the synchronization environment.

Ensure you have the following accounts ready:

  • Domain Administrator credentials
  • Microsoft 365 Administrator credentials

These are necessary to authenticate and carry out the update.

Once you have the prerequisites, follow these steps to update the SSO decryption key. This will refresh the key used for Single Sign-On, ensuring your environment stays secure.

Start by logging into the server where Azure AD/EntraID Connect Sync is installed.

Open PowerShell as Administrator.

Import-Module AzureAD
cd $env:programfiles"\Microsoft Azure Active Directory Connect"
Import-Module .\AzureADSSO.psd1
New-AzureADSSOAuthenticationContext
Note

If this command fails due to a TLS error, ensure that TLS 1.2 is enabled on the server. See troubleshooting below.

Get-AzureADSSOStatus | ConvertFrom-Json

This will give you a clear overview of which domains have SSO enabled.

$credentials = Get-Credential

Use the SAM Account name format (e.g., Contoso\Administrator).

Update-AzureADSSOForest -OnPremCredentials $credentials
Warning

Do not run this command more than once without checking the key status.

Repeat the process using the appropriate credentials for each forest.

Log into the EntraID portal and navigate to the Azure AD Connect Sync page. You should now see an updated decryption key date for each forest.

Update the SSO decryption key at least every 30 days to ensure it remains valid and secure.

If you encounter issues, enforce TLS 1.2:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Updating the Azure AD SSO decryption key is a straightforward but essential process for keeping your environment secure. By following the steps outlined above, you can ensure that your Single Sign-On configurations remain up to date and continue to function smoothly. Schedule regular checks and updates to prevent any unnecessary security risks.