Skip to content

Commit

Permalink
Added log date
Browse files Browse the repository at this point in the history
  • Loading branch information
merill committed May 25, 2024
1 parent 68eae4f commit f5c0a66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Export-MsIdAzureMfaReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ function Export-MsIdAzureMfaReport {
foreach ($method in $methodsRegistered) {
$methodInfo = $authMethods | Where-Object { $_.ReportType -eq $method }
if ($null -eq $methodInfo) { $userAuthMethod += $method }
else { $userAuthMethod += $methodInfo.DisplayName }
else {
if($methodInfo.IsMfa) { $userAuthMethod += $methodInfo.DisplayName }
}
}
$user.AuthenticationMethods = $userAuthMethod -join ', '
$user.IsMfaRegistered = Get-ObjectPropertyValue $resultsJson -Property 'isMfaRegistered'
Expand Down Expand Up @@ -340,10 +342,8 @@ function Export-MsIdAzureMfaReport {
Write-Progress -Id 0 -Activity $activity -PercentComplete $percent -Status $Status
}

# #, Mobile phone, Office phone, Alternate mobile phone, Security question, , , Hardware OATH token, FIDO2 security key, , Microsoft Passwordless phone sign-in, , , Passkey (Microsoft Authenticator), Passkey (Windows Hello)

function GetAuthMethodInfo($type) {
$methodInfo = $authMethods | Where-Object { $_.Type -eq $type }
$methodInfo = $authMethods | Where-Object { $_.Type -eq $type}
if ($null -eq $methodInfo) {
# Default to the type and assume it is MFA
$methodInfo = @{
Expand Down
2 changes: 2 additions & 0 deletions src/Get-MsIdAzureUsers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ function Get-MsIdAzureUsers {
return
}

$dayDiff = (Get-Date).Subtract($earliestDate).Days
Write-Host "Getting sign in logs for the last $dayDiff days (from $earliestDate to now)..." -ForegroundColor Green
$graphUri = (GetGraphBaseUri) + "/beta/auditLogs/signIns?`$select=$select&`$filter=$filter"

Write-Verbose "Getting sign in logs $graphUri"
Expand Down

0 comments on commit f5c0a66

Please sign in to comment.