Share via

Unhandled Exception configuring replacement backup/staging Entra Connect server

James Hevener 5 Reputation points
2025-04-16T14:08:33.2633333+00:00

Trying to move our backup / staging formerly AD Connect now Entra Connect from an on-premise server to an Azure defined AD Controller server in our tenant.

Getting a vague "Unhandled Exception" message and not sure what to do, how to troubleshoot. Additionally (maybe contributing) our defined IaaS Windows Servers in Azure are showing not activated / deactivated license. Our MAK key from on-prem does not work.

Here is a snip of the message from the Entra Connect install:

[09:50:17.456] [ 4] [INFO ] MSAL: False MSAL 4.61.3.0 MSAL.Desktop 4.7.2 Windows Server 2019 Datacenter [2025-04-16 13:50:17Z - 0f32626a-f784-43d1-8b2a-167430d6ce2e]

=== Token Acquisition finished successfully:

[09:50:17.456] [ 4] [INFO ] MSAL: False MSAL 4.61.3.0 MSAL.Desktop 4.7.2 Windows Server 2019 Datacenter [2025-04-16 13:50:17Z - 0f32626a-f784-43d1-8b2a-167430d6ce2e] AT expiration time: 4/16/2025 3:18:49 PM +00:00, scopes: email https://graph.microsoft.com/.default https://graph.microsoft.com/Application.ReadWrite.All https://graph.microsoft.com/Directory.Read.All https://graph.microsoft.com/Domain.ReadWrite.All https://graph.microsoft.com/OnPremDirectorySynchronization.ReadWrite.All https://graph.microsoft.com/Organization.ReadWrite.All openid profile. source: IdentityProvider

[09:50:17.456] [ 4] [INFO ] MSAL: False MSAL 4.61.3.0 MSAL.Desktop 4.7.2 Windows Server 2019 Datacenter [2025-04-16 13:50:17Z - 0f32626a-f784-43d1-8b2a-167430d6ce2e] Fetched access token from host login.microsoftonline.com.

[09:50:17.457] [ 18] [INFO ] Authenticate-MSAL: successfully acquired an access token. TenantId=dc067639-3e4a-4aeb-b292-7f1e964e6827, ExpiresUTC=4/16/2025 3:18:49 PM +00:00, UserInfo=******@valottery.com, IdentityProvider=login.microsoftonline.com.

[09:50:17.457] [ 18] [INFO ] AzureTenantPage: successfully aquired graph token.

[09:51:57.546] [ 18] [ERROR] A terminating unhandled exception occurred.

Exception Data (Raw): System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at Microsoft.Online.Deployment.PowerShell.DefaultHttpClient.

Microsoft Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Most helpful
  1. Raja Pothuraju 47,640 Reputation points Microsoft Employee Moderator
    2025-04-18T14:41:50.4733333+00:00

    Hello @James Hevener,

    Thank you for sharing the information via private message.

    Based on our discussion, it appears that firewall rules on your server might be contributing to the issue.

    For reference, you are reviewing the following documentation: Microsoft Entra Connect: Troubleshoot Microsoft Entra connectivity issues - Microsoft Entra ID | Microsoft Learn.

    You also mentioned that you're in the process of working through the checks and approvals required for your firewall change request with the appropriate teams.

    Please feel free to share an update once you've made progress—I'd be glad to know if it helps resolve the issue.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.