Skip to content

Commit a95520a

Browse files
authored
Merge pull request Azure#4316 from markcowl/smtokauth
Fixing issue with TokenCache in RDFE scenarios
2 parents ef766b9 + 1c57ed9 commit a95520a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/Commands.Common.Authentication/Factories/AuthenticationFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public SubscriptionCloudCredentials GetSubscriptionCloudCredentials(IAzureContex
163163
context.Account.Id,
164164
context.Environment.Name,
165165
tenant);
166-
if (context.TokenCache != null)
166+
if (context.TokenCache != null && context.TokenCache.CacheData != null && context.TokenCache.CacheData.Length > 0)
167167
{
168168
tokenCache = context.TokenCache;
169169
}

0 commit comments

Comments
 (0)