From 5a6b2d5df72c526e343e133f553818eedefb52f4 Mon Sep 17 00:00:00 2001 From: rusanu Date: Sun, 1 Nov 2020 10:26:20 +0200 Subject: [PATCH] Fix serviceUrl --- UiPath.PowerShell/Util/AuthenticatedCmdlet.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/UiPath.PowerShell/Util/AuthenticatedCmdlet.cs b/UiPath.PowerShell/Util/AuthenticatedCmdlet.cs index 4fb14ef3..0c2f7cf3 100644 --- a/UiPath.PowerShell/Util/AuthenticatedCmdlet.cs +++ b/UiPath.PowerShell/Util/AuthenticatedCmdlet.cs @@ -288,7 +288,6 @@ internal static void RefreshAuthToken(AuthToken authToken) out headers); string tenantLogicalName; - string serviceUrl; jt = JArray.Parse(response); if (!string.IsNullOrEmpty(authToken.TenantName)) @@ -299,7 +298,6 @@ internal static void RefreshAuthToken(AuthToken authToken) throw new ApplicationException($"The requested tenant {authToken.TenantName} was not found"); } tenantLogicalName = tenant.Value("serviceInstanceLogicalName"); - serviceUrl = tenant.Value("serviceUrl"); } else { @@ -313,13 +311,12 @@ internal static void RefreshAuthToken(AuthToken authToken) } tenantLogicalName = jt[0].Value("serviceInstanceLogicalName"); - serviceUrl = jt[0].Value("serviceUrl"); } authToken.Token = accessToken; authToken.AuthorizationRefreshToken = refreshToken; authToken.AuthorizationTokenId = idToken; - authToken.URL = serviceUrl ?? $"{authToken.AccountUrl}/{accountLogicalName}/{tenantLogicalName}"; + authToken.URL = $"{authToken.AccountUrl}/{accountLogicalName}/{tenantLogicalName}"; authToken.TenantName = tenantLogicalName; authToken.AccountName = accountLogicalName; }