Skip to content

Commit 82fe3d4

Browse files
committed
fix(Get-MFAChanges): missmatch if multiple mfa numbers
1 parent 2b8e7d4 commit 82fe3d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/microsoft/entra/Get-MFAChanges.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ function Update-Data([PSCustomObject[]]$NewData, [OfficeOpenXml.ExcelWorksheet]$
707707
If ($AddNewData) {
708708
$Local:Cell = $WorkSheet.Cells[$Local:Row, $Local:NewColumnIndex];
709709

710-
$Cell.Value = $Local:User.MFA.Phone;
710+
$Cell.Value = $Local:User.MFA.Phone | Select-Object -First 1;
711711
# $Local:Cell.Value = $Local:User | Select-Object -ExcludeProperty Email, DisplayName | ConvertTo-FormattedToml;
712712
# $Cell.Style.WrapText = $true
713713
# $Local:Cell.Style.Numberformat.Format = '@';
@@ -814,11 +814,11 @@ function Set-Check(
814814
[String]$Local:PrevNumber = $WorkSheet.Cells[$Local:Row, $Local:PrevColumn].Value;
815815
[String]$Local:CurrNumber = $WorkSheet.Cells[$Local:Row, $Local:CurrColumn].Value;
816816
($Message, $MessageColour) = if ([String]::IsNullOrWhitespace($Local:PrevNumber) -and [String]::IsNullOrWhitespace($Local:CurrNumber)) {
817-
'Missing',[System.Drawing.Color]::Turquoise;
817+
'Missing', [System.Drawing.Color]::Turquoise;
818818
} elseif ([String]::IsNullOrWhitespace($Local:PrevNumber)) {
819-
'No Previous',[System.Drawing.Color]::Yellow;
819+
'No Previous', [System.Drawing.Color]::Yellow;
820820
} elseif ($Local:PrevNumber -eq $Local:CurrNumber) {
821-
'Match',[System.Drawing.Color]::Green;
821+
'Match', [System.Drawing.Color]::Green;
822822
} else {
823823
'Mismatch',[System.Drawing.Color]::Red;
824824
}

0 commit comments

Comments
 (0)