From aefa624a03f726a04feeda9104e06d6a094a3e21 Mon Sep 17 00:00:00 2001 From: Shawn Melton <11204251+wsmelton@users.noreply.github.com> Date: Thu, 14 Oct 2021 09:44:23 -0500 Subject: [PATCH] New-TssSession - bug fix when login failure stop throwing warning about version --- src/functions/authentication/New-TssSession.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/functions/authentication/New-TssSession.ps1 b/src/functions/authentication/New-TssSession.ps1 index 85bd5f85..bd705c86 100644 --- a/src/functions/authentication/New-TssSession.ps1 +++ b/src/functions/authentication/New-TssSession.ps1 @@ -233,6 +233,9 @@ function New-TssSession { return } } + if (-not $outputTssSession.AccessToken) { + return + } $outputTssSession.StartTime = [datetime]::Now Write-Verbose "Setting start time for session: $($outputTssSession.StartTime)" if ($ignoreVersion -or ((Test-Path variable:tss_ignoreversioncheck) -and $tss_ignoreversioncheck)) {