Skip to content

Commit

Permalink
removed redundant call to Get-MgBetaPolicyAuthenticationMethodPolicy …
Browse files Browse the repository at this point in the history
…which was left by mistake
  • Loading branch information
tkol2022 committed Apr 29, 2024
1 parent 103adc2 commit 2c57498
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PowerShell/ScubaGear/Modules/Providers/ExportAADProvider.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ function Export-AADProvider {
$DirectorySettings = ConvertTo-Json -Depth 10 @($Tracker.TryCommand("Get-MgBetaDirectorySetting"))

##### This block of code below supports 3.3, 3.4, 3.5
$AuthenticationMethodPolicy = $Tracker.TryCommand("Get-MgBetaPolicyAuthenticationMethodPolicy")
$AuthenticationMethodPolicyRootObject = $Tracker.TryCommand("Get-MgBetaPolicyAuthenticationMethodPolicy")

$AuthenticationMethodFeatureSettings = @($AuthenticationMethodPolicy.AuthenticationMethodConfigurations | Where-Object { $_.Id})
$AuthenticationMethodFeatureSettings = @($AuthenticationMethodPolicyRootObject.AuthenticationMethodConfigurations | Where-Object { $_.Id})

# Exclude the AuthenticationMethodConfigurations so we do not duplicate it in the JSON
$AuthenticationMethodPolicy = Get-MgBetaPolicyAuthenticationMethodPolicy | ForEach-Object {
$AuthenticationMethodPolicy = $AuthenticationMethodPolicyRootObject | ForEach-Object {
$_ | Select-Object * -ExcludeProperty AuthenticationMethodConfigurations
}

Expand Down

0 comments on commit 2c57498

Please sign in to comment.