File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,12 @@ function Get-CIPPMFAState {
1717 }
1818 }
1919
20+ $Errors = [System.Collections.Generic.List [object ]]::new()
2021 try {
2122 $SecureDefaultsState = (New-GraphGetRequest - Uri ' https://graph.microsoft.com/beta/policies/identitySecurityDefaultsEnforcementPolicy' - tenantid $TenantFilter ).IsEnabled
2223 } catch {
2324 Write-Host " Secure Defaults not available: $ ( $_.Exception.Message ) "
25+ $Errors.Add (@ {Step = ' SecureDefaults' ; Message = $_.Exception.Message })
2426 }
2527 $CAState = [System.Collections.Generic.List [object ]]::new()
2628
@@ -29,6 +31,7 @@ function Get-CIPPMFAState {
2931 } catch {
3032 $CAState.Add (' Not Licensed for Conditional Access' ) | Out-Null
3133 $MFARegistration = $null
34+ $Errors.Add (@ {Step = ' MFARegistration' ; Message = $_.Exception.Message })
3235 Write-Host " User registration details not available: $ ( $_.Exception.Message ) "
3336 }
3437
@@ -58,6 +61,7 @@ function Get-CIPPMFAState {
5861 } catch {
5962 $CASuccess = $false
6063 $CAError = " CA policies not available: $ ( $_.Exception.Message ) "
64+ $Errors.Add (@ {Step = ' CAPolicies' ; Message = $_.Exception.Message })
6165 }
6266 }
6367
@@ -110,6 +114,7 @@ function Get-CIPPMFAState {
110114 CoveredByCA = $CoveredByCA
111115 CAPolicies = $UserCAState
112116 CoveredBySD = $SecureDefaultsState
117+ Errors = $Errors
113118 RowKey = [string ]($_.UserPrincipalName ).replace(' #' , ' ' )
114119 PartitionKey = ' users'
115120 }
You can’t perform that action at this time.
0 commit comments