Hi Paul,
Yes, my bad. Too many test Octopus instances
Here is the output now
09:31:21 Info | Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: Service returned error. Check InnerException for more details â> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. â> System.ComponentModel.Win32Exception: The client and server cannot communicate, because they do not possess a common algorithm
09:31:21 Info | at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)
09:31:21 Info | at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential)
09:31:21 Info | at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint)
09:31:21 Info | at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output)
09:31:21 Info | at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count)
09:31:21 Info | at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
09:31:21 Info | at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
09:31:21 Info | at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
09:31:21 Info | at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
09:31:21 Info | at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
09:31:21 Info | at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
09:31:21 Info | at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
09:31:21 Info | at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
09:31:21 Info | at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
09:31:21 Info | at System.Net.ConnectStream.WriteHeaders(Boolean async)
09:31:21 Info | â End of inner exception stack trace â
09:31:21 Info | at System.Net.HttpWebRequest.GetResponse()
09:31:21 Info | at Microsoft.IdentityModel.Clients.ActiveDirectory.HttpWebRequestWrapper.d__2.MoveNext()
09:31:21 Info | â End of stack trace from previous location where exception was thrown â
09:31:21 Info | at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09:31:21 Info | at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09:31:21 Info | at Microsoft.IdentityModel.Clients.ActiveDirectory.HttpHelper.d__01.MoveNext() 09:31:21 Info | --- End of inner exception stack trace --- 09:31:21 Info | at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.RunAsyncTask[T](Task
1 task)
09:31:21 Info | at Microsoft.Azure.Commands.Common.Authentication.ServicePrincipalTokenProvider.GetAccessToken(AdalConfiguration config, String promptBehavior, Action1 promptAction, String userId, SecureString password, String credentialType) 09:31:21 Info | at Microsoft.Azure.Commands.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzureAccount account, IAzureEnvironment environment, String tenant, SecureString password, String promptBehavior, Action
1 promptAction, IAzureTokenCache tokenCache, String resourceId)
09:31:21 Info | at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureAccount account, IAzureEnvironment environment, String tenantId, SecureString password, String promptBehavior, Action1 promptAction) 09:31:21 Info | at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account, IAzureEnvironment environment, String tenantId, String subscriptionId, String subscriptionName, SecureString password, Boolean skipValidation, Action
1 promptAction, String name, Boolean shouldPopulateContextList)
09:31:21 Info | at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass87_0.b__0(AzureRmProfile localProfile, RMProfileClient profileClient, String name)
09:31:21 Info | at Microsoft.Azure.Commands.Profile.Common.AzureContextModificationCmdlet.ModifyContext(Action2 contextAction) 09:31:21 Info | at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.SetContextWithOverwritePrompt(Action
3 setContextAction)
09:31:21 Info | at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.ExecuteCmdlet()
09:31:21 Info | at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
09:31:21 Info | ErrorCode: service_returned_error
09:31:21 Info | StatusCode: 501
09:31:21 Verbose | Process C:\windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20201005093114-62-1 exited with code 0
09:31:21 Verbose | Updating manifest with output variables
09:31:21 Verbose | Updating manifest with action evaluated variables
09:31:21 Verbose | Successfully finished Debug on the Octopus Server
Note: if I add
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
at the very begining then the reply is different
v09:34:05 Info | Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: AADSTS700016: Application with identifier â****â was not found in the directory â*****â. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.
09:34:05 Info | Trace ID: 1ba0cf6e-1fa1-48a5-a046-17086bebe901
09:34:05 Info | Correlation ID: 38c94e25-bf04-4f12-9bc6-e6e32b8dbc76
09:34:05 Info | Timestamp: 2020-10-05 09:34:05Z â> System.Net.WebException: The remote server returned an error: (400) Bad Request.
09:34:05 Info | at System.Net.HttpWebRequest.GetResponse()
09:34:05 Info | at Microsoft.IdentityModel.Clients.ActiveDirectory.HttpWebRequestWrapper.d__2.MoveNext()
09:34:05 Info | â End of stack trace from previous location where exception was thrown â
09:34:05 Info | at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09:34:05 Info | at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09:34:05 Info | at Microsoft.IdentityModel.Clients.ActiveDirectory.HttpHelper.d__01.MoveNext() 09:34:05 Info | --- End of inner exception stack trace --- 09:34:05 Info | at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.RunAsyncTask[T](Task
1 task)
09:34:05 Info | at Microsoft.Azure.Commands.Common.Authentication.ServicePrincipalTokenProvider.GetAccessToken(AdalConfiguration config, String promptBehavior, Action1 promptAction, String userId, SecureString password, String credentialType) 09:34:05 Info | at Microsoft.Azure.Commands.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzureAccount account, IAzureEnvironment environment, String tenant, SecureString password, String promptBehavior, Action
1 promptAction, IAzureTokenCache tokenCache, String resourceId)
09:34:05 Info | at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureAccount account, IAzureEnvironment environment, String tenantId, SecureString password, String promptBehavior, Action1 promptAction) 09:34:05 Info | at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account, IAzureEnvironment environment, String tenantId, String subscriptionId, String subscriptionName, SecureString password, Boolean skipValidation, Action
1 promptAction, String name, Boolean shouldPopulateContextList)
09:34:05 Info | at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass87_0.b__0(AzureRmProfile localProfile, RMProfileClient profileClient, String name)
09:34:05 Info | at Microsoft.Azure.Commands.Profile.Common.AzureContextModificationCmdlet.ModifyContext(Action2 contextAction) 09:34:05 Info | at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.SetContextWithOverwritePrompt(Action
3 setContextAction)
09:34:05 Info | at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.ExecuteCmdlet()
09:34:05 Info | at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
09:34:05 Info | ErrorCode: unauthorized_client
09:34:05 Info | StatusCode: 400
09:34:05 Verbose | Process C:\windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20201005093402-63-3 exited with code 0
09:34:06 Verbose | Updating manifest with output variables
09:34:06 Verbose | Updating manifest with action evaluated variables
09:34:06 Verbose | Successfully finished Debug on the Octopus Server
Regards,
Andrew