From 2354dfc4c702ad59f68f800c740d9ab911666fbb Mon Sep 17 00:00:00 2001 From: Christopher Suh Date: Thu, 29 Oct 2020 18:43:19 -0400 Subject: [PATCH] Added additional code path if user.UniqueId not set (#1105) * commented subscription caching * added additional code path if user.UniqueId not set --- .../AzureAuthenticationManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs index 43a07b05..b7fc23f1 100644 --- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs +++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/AzureAuthenticationManager.cs @@ -222,9 +222,10 @@ namespace Microsoft.SqlTools.ResourceProvider.DefaultImpl if (user != null) { - result = _subscriptionCache.Get(user.UniqueId); - if (result == null) - { + if (user.UniqueId != "") { + result = _subscriptionCache.Get(user.UniqueId); + } + else { result = await GetSubscriptionFromServiceAsync(user); _subscriptionCache.UpdateCache(user.UniqueId, result); }