diff --git a/IdentityCommand/Private/Get-MechanismAnswer.ps1 b/IdentityCommand/Private/Get-MechanismAnswer.ps1 index c41028c..c76234a 100644 --- a/IdentityCommand/Private/Get-MechanismAnswer.ps1 +++ b/IdentityCommand/Private/Get-MechanismAnswer.ps1 @@ -50,7 +50,7 @@ function Get-MechanismAnswer { switch ($Mechanism.Name) { - 'UP' { + { $PSItem -match 'UP|SMS' } { #User Password already provided via Credential $Answer = $Credential.Password @@ -94,7 +94,7 @@ function Get-MechanismAnswer { } - { $PSItem -match 'SMS|OATH' } { + { $PSItem -match 'OATH' } { #Prompt for TOTP/SMS code input $Answer = Read-Host -Prompt $($Mechanism.PromptMechChosen) -AsSecureString diff --git a/IdentityCommand/Private/Start-AdvanceAuthentication.ps1 b/IdentityCommand/Private/Start-AdvanceAuthentication.ps1 index 62de757..1ffe98d 100644 --- a/IdentityCommand/Private/Start-AdvanceAuthentication.ps1 +++ b/IdentityCommand/Private/Start-AdvanceAuthentication.ps1 @@ -94,6 +94,10 @@ Function Start-AdvanceAuthentication { break } + { $PSItem.Name -match 'SMS' } { + $Answer = Read-Host -Prompt $($Mechanism.PromptMechChosen) -AsSecureString + } + { $($PSItem.Name) -match 'SQ|UP|OATH|SMS|RESET' } { #Provide Answer Directly