You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Save-PSResource uses NuGet version range syntax: https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort#version-ranges
Copy file name to clipboardExpand all lines: src/powershell/public/Connect-ZtAssessment.ps1
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -132,14 +132,13 @@ function Connect-ZtAssessment {
132
132
Connect-MgGraph@params-ErrorAction Stop
133
133
$contextTenantId= (Get-MgContext).TenantId
134
134
}
135
-
136
135
catch {
137
136
Stop-PSFFunction-Message "Failed to authenticate to Graph"-ErrorRecord $_-EnableException $true-Cmdlet $PSCmdlet
138
137
}
139
138
140
139
try {
141
140
Write-Verbose"Verifying Zero Trust context and permissions..."
142
-
Test-ZtContext
141
+
$null=Test-ZtContext
143
142
}
144
143
catch {
145
144
Stop-PSFFunction-Message "Authenticated to Graph, but the requirements for the ZeroTrustAssessment are not met by the established session:`n$_"-ErrorRecord $_-EnableException $true-Cmdlet $PSCmdlet
0 commit comments