Forum Discussion

PaulJebastin's avatar
PaulJebastin
Copper Contributor
Jun 27, 2023

ADAL authentication failed: Exception of type 'System.Net.Http.HttpRequestException' was thrown.

Co-management enabled in our environment, however I don't notice any problems with it. I found the below errors when I checked the SMS_SERVICE_CONNECTOR component, but I'm not sure what is causing them. Could someone please shed any light on the following errors? Thank you.

 

SMS_SERVICE_CONNECTOR COMPONENT ERRORS:

CMGatewayNotificationWorker worker ADAL authentication failed: Exception of type 'System.Net.Http.HttpRequestException' was thrown.
GenericDownloadWorker_SettingsDefinition worker ADAL authentication failed: Exception of type 'System.Net.Http.HttpRequestException' was thrown.
GenericDownloadWorker_HierarchyFeature worker ADAL authentication failed: Exception of type 'System.Net.Http.HttpRequestException' was thrown.
GenericUploadWorker_PolicySummaryResources worker ADAL authentication failed: Exception of type 'System.Net.Http.HttpRequestException' was thrown.
Failed to execute worker "CMGatewayNotificationWorker" with error "Exception of type 'System.Net.Http.HttpRequestException' was thrown.". See CMGatewayNotificationWorker.log for further details.

 

CMGatewayNotificationWorker.log (full log attached):

[GetNotifications] Response from https://eu.gateway.configmgr.manage.microsoft.com/api/gateway/Notification is: 204 (No Content)	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:12	126 (0x007E)
Response status code: 204 (NoContent) Activity ID: 1eab4bff-aaee-41f4-adce-8166e2f9daa2	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:12	126 (0x007E)
Using location service to look up URL base	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:12	126 (0x007E)
Using direct connection to URL 'https://gateway.configmgr.manage.microsoft.com/api/gateway/LocationService'	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:12	126 (0x007E)
Creating web request to: https://gateway.configmgr.manage.microsoft.com/api/gateway/LocationService	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:12	126 (0x007E)
[LocationRequest (unauthenticated)] Creating web request to: https://gateway.configmgr.manage.microsoft.com/api/gateway/LocationService Method: HEAD Activity ID: 1de983c8-74a0-4c56-94da-81add57c0412 Timeout: 00:02:00	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:12	126 (0x007E)
[LocationRequest (unauthenticated)] Response from https://gateway.configmgr.manage.microsoft.com/api/gateway/LocationService is: 401 (Unauthorized)	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:12	126 (0x007E)
Response status code: 401 (Unauthorized) Activity ID: 156780c6-8e7a-4691-abb0-5ef10f9ba30f	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:12	126 (0x007E)
Authenticating with web service at: https://gateway.configmgr.manage.microsoft.com/api/gateway/LocationService	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:12	126 (0x007E)
An error occurred while sending the request.	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
Exception details:	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
[Critical][CMGatewayNotificationWorker][0][System.Net.Http.HttpRequestException][0x80131500]
An error occurred while sending the request.    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Platforms.net45.Http.DnsSensitiveClientHandler.<SendAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteWithRetryAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<SendPostAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<SendPostAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.<ExecuteRequestAsync>d__11`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.<GetTokenAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.OAuth2.TokenClient.<SendHttpAndClearTelemetryAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.OAuth2.TokenClient.<SendTokenRequestAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.<FetchNewAccessTokenAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<RunAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.ApiConfig.Executors.ConfidentialClientExecutor.<ExecuteAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ConfigurationManager.CloudBase.AAD.MsalAuthenticationProvider.<GetAuthenticationResultAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ConfigurationManager.CloudBase.AAD.MsalClientFactory.<GetMsalApplicationTokenAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ConfigurationManager.ServiceConnector.Utility.<GetAuthenticationResultAsync>d__52.MoveNext()	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
[Critical][CMGatewayNotificationWorker][1][System.Net.WebException][0x80131509]
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
Auth exception	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
Exception details:	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
[Critical][CMGatewayNotificationWorker][0][System.Net.Http.HttpRequestException][0x80131500]
Exception of type 'System.Net.Http.HttpRequestException' was thrown.    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Platforms.net45.Http.DnsSensitiveClientHandler.<SendAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteWithRetryAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<SendPostAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<SendPostAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.<ExecuteRequestAsync>d__11`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.<GetTokenAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.OAuth2.TokenClient.<SendHttpAndClearTelemetryAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.OAuth2.TokenClient.<SendTokenRequestAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.<FetchNewAccessTokenAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<RunAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.ApiConfig.Executors.ConfidentialClientExecutor.<ExecuteAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ConfigurationManager.CloudBase.AAD.MsalAuthenticationProvider.<GetAuthenticationResultAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ConfigurationManager.CloudBase.AAD.MsalClientFactory.<GetMsalApplicationTokenAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ConfigurationManager.ServiceConnector.Utility.<GetAuthenticationResultAsync>d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ConfigurationManager.ServiceConnector.ServiceConnectorWorkerBase.<ApplyAuthorizationToRequestAsync>d__87.MoveNext()	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
[Critical][CMGatewayNotificationWorker][1][System.Net.WebException][0x80131509]
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
Unhandled exception when retrieving service locations. Ignore to continue on notifications listening	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
Exception details:	SMS_SERVICE_CONNECTOR_CMGatewayNotificationWorker	27/06/2023 12:51:28	126 (0x007E)
<![LOG[[Critical][CMGatewayNotificationWorker][0][System.Net.Http.HttpRequestException][0x80131500]
Exception of type 'System.Net.Http.HttpRequestException' was thrown.    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Platforms.net45.Http.DnsSensitiveClientHandler.<SendAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteWithRetryAsync>d__12.MoveNext()
--- End of stack trace from previ

 

 

 

2 Replies

No RepliesBe the first to reply

Resources