# Upgrade Azure Active Directory Connect fails with unexpected error

Today, I made the decision to upgrade my test environment and update the version of Azure AD Connect to the latest one. The process is usually simple: download a new MSI, run it, click next a few times, enter the credentials for your Global Admin, and you’re finished. However, this time, I encountered an error.

blog

02 Oct 2024 fr

![Upgrade Azure Active Directory Connect fails with unexpected error](/wp-content/uploads/2024/10/AzureADConnectUpgradeStuck.jpg)

[Voir les images (10)](#pf-content-image-1-0)

Today, I made the decision to upgrade my test environment and update the version of Azure AD Connect to the latest one. The process is usually simple: download a new MSI, run it, click next a few times, enter the credentials for your Global Admin, and you're finished. However, this time, I encountered an error.

### 💡 Problem description

> Unable to validate credentials due to an unexpected error. Restart Azure AD Connect with the /InteractiveAuth option to further diagnose this issue. (extendedMessage: An error occurred while sending the request. | The underlying connection was closed: An unexpected error occurred on a send. | Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. | An existing connection was forcibly closed by the remote host webException: The underlying connection was closed: An unexpected error occurred on a send. STS endpoint: HTTPS://LOGIN.MICROSOFTONLINE.COM/XXXXXXX)

[!\[Azure AD Connect upgrade wizard showing an unexpected credential validation error\](/wp-content/uploads/2024/10/image-1-1024x713.png)](/wp-content/uploads/2024/10/image-1-1024x713.png)

### 💡 Solution

At first, I thought the solution to this problem was quite simple—due to authentication changes, one needs to start the upgrade process with **InteractiveAuth**, as it will most likely require **MFA**. So I restarted the process, this time with the InteractiveAuth switch, and to my surprise, it didn't work!

```bat
"C:\Program Files\Microsoft Azure Active Directory Connect\AzureADConnect.exe" /interactiveauth
```

[!\[Command prompt launching AzureADConnect.exe with the /interactiveauth switch\](/wp-content/uploads/2024/10/image-2-1024x203.png)](/wp-content/uploads/2024/10/image-2-1024x203.png)[!\[Azure AD Connect sign-in screen opened after restarting the upgrade with InteractiveAuth\](/wp-content/uploads/2024/10/image-3-1024x719.png)](/wp-content/uploads/2024/10/image-3-1024x719.png)[!\[Azure AD Connect still failing to validate credentials after using InteractiveAuth\](/wp-content/uploads/2024/10/image-9-1024x724.png)](/wp-content/uploads/2024/10/image-9-1024x724.png)

Since I was at the same place as before, I've decided to try to make sure I use **TLS 1.2** on the server. It seems all the new services require **TLS 1.2**, and if you've been using your server for a while, that's not a default setting. I had a similar problem four years ago when PowerShellGallery was broken due to the TLS 1.2 change I blogged about. You can read about it [here](https://evotec.xyz/powershellgallery-disables-support-for-tls-1-0-breaking-install-module/). Setting proper registry settings the way to go:

```powershell
Set-ItemProperty `
    -Path "HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319" `
    -Name "SchUseStrongCrypto" `
    -Value "1" `
    -Type DWord `
    -Force
Set-ItemProperty `
    -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319" `
    -Name "SchUseStrongCrypto" `
    -Value "1" `
    -Type DWord `
    -Force
```

[!\[Registry settings enabling SchUseStrongCrypto for TLS 1.2 in .NET Framework\](/wp-content/uploads/2024/10/image-5-1024x314.png)](/wp-content/uploads/2024/10/image-5-1024x314.png)

Now reboot the server, restart the upgrade process.

[!\[Azure AD Connect sign-in screen after rebooting with TLS 1.2 enabled\](/wp-content/uploads/2024/10/image-6-1024x719.png)](/wp-content/uploads/2024/10/image-6-1024x719.png)[!\[Azure AD Connect showing a different authentication error after enabling TLS 1.2\](/wp-content/uploads/2024/10/image-7-1024x720.png)](/wp-content/uploads/2024/10/image-7-1024x720.png)

This time, the error is a bit different, so again, I suspect it's related to the MFA process on my account. Let's restart it again with **InteractiveAuth**.

[!\[Microsoft sign-in page opened by Azure AD Connect after restarting with InteractiveAuth\](/wp-content/uploads/2024/10/image-8-1024x882.jpg)](/wp-content/uploads/2024/10/image-8-1024x882.jpg)

As expected, it worked much better this time, prompting me to change my password.

[!\[Microsoft account password change prompt during Azure AD Connect authentication\](/wp-content/uploads/2024/10/image-8-2-1024x889.jpg)](/wp-content/uploads/2024/10/image-8-2-1024x889.jpg)

Once changed, authentication worked and I was ready for an upgrade!

[!\[Azure AD Connect upgrade wizard ready to continue after successful authentication\](/wp-content/uploads/2024/10/image-8-1024x719.png)](/wp-content/uploads/2024/10/image-8-1024x719.png)

## Projets associés

Projets liés aux tags, catégories et au contenu de cet article.

[Tous les projets](/fr/projets/)

Recherche des projets associés...

[Retour au blog](/blog)

## Articles associés

- [Azure ADConnect Export Failed – Permission-issue error](/fr/blog/azure-adconnect-export-failed-permission-issue-error/)
- [Azure AD – Removing Inactive Azure AD Pass-through Agent](/fr/blog/azure-ad-removing-inactive-azure-ad-pass-through-agent/)
- [AzureAD – Enable Password Expiration with Password Hash Synchronization](/fr/blog/azuread-enable-password-expiration-with-password-hash-synchronization/)

<!-- PowerForge markdown artifact sha256:AC2971302783753BBB7D702DE42C709D0C3D3BC18548C25356C437AB8022AC7A -->
