Skip to content

Commit

Permalink
Updated doc steps for free tenant.
Browse files Browse the repository at this point in the history
  • Loading branch information
merill committed Jun 8, 2024
1 parent b2b360e commit a52105a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/Export-MsIdAppConsentGrantReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
.DESCRIPTION
This cmdlet requires the `ImportExcel` module to be installed if you use the `-ReportOutputType ExcelWorkbook` parameter.
<iframe width="560" height="315" src="https://www.youtube.com/embed/vO0m5yE3dZA" title="Run a quick OAuth app audit of your tenant using this command and protect yourself" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
.EXAMPLE
PS > Install-Module ImportExcel
PS > Connect-MgGraph -Scopes Directory.Read.All
Expand Down
20 changes: 10 additions & 10 deletions src/Export-MsIdAzureMfaReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@
- Sign-in to the **[Entra Admin Portal](https://entra.microsoft.com)**
- From the left navigation select: **Identity** → **Monitoring & health** → **Sign-in logs**.
- Select the **Date** filter and set to **Last 7 days**
- Select **Add filters** → **Application** and type in: **Azure**
- Select **Add filters** → **Application** and click **Apply**
- Type in: **Azure** and click **Apply**
- Select **Download** → **Download JSON**
- Set the **File Name** of the first textbox to **signins** and select it's **Download** button.
- Set the **File Name** of the first textbox to **signins** and click **Download**.
- Once the file is downloaded, copy it to the folder where the export command will be run.
Re-run this command with the **-SignInsJsonPath** option.
Run the export with the **-SignInsJsonPath** option.
```powershell
Export-MsIdAzureMfaReport ./report.xlsx -SignInsJsonPath ./signins.json
```
Expand Down Expand Up @@ -156,11 +157,11 @@ function Export-MsIdAzureMfaReport {
}
}

if ($UsersMfa) {
# We only need to generate the report.
$azureUsersMfa = $UsersMfa
}
else {
# if ($UsersMfa) {
# # We only need to generate the report.
# $azureUsersMfa = $UsersMfa
# }
# else {
if (![string]::IsNullOrEmpty($SignInsJsonPath)) {
# Don't look up graph if we have the sign-ins json (usually free tenant download from portal)
$Users = Get-MsIdAzureUsers -SignInsJsonPath $SignInsJsonPath
Expand All @@ -171,15 +172,14 @@ function Export-MsIdAzureMfaReport {
$Users = Get-MsIdAzureUsers -Days $Days
}
$azureUsersMfa = GetUserMfaInsight $Users # Get the MFA status
}
# }

if ($isExcel) {
if ($null -eq $azureUsersMfa) {
Write-Host 'Excel workbook not generated as there are no users to report on.' -ForegroundColor Yellow
}
else {
GenerateExcelReport $azureUsersMfa $ExcelWorkbookPath
Write-Host "Note: The 'MFA Status' column does not apply for users signing in using Certificate Based Authentication and/or third-party MFA providers." -ForegroundColor Yellow
}
}

Expand Down
7 changes: 4 additions & 3 deletions src/Get-MsIdAzureUsers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ function Get-MsIdAzureUsers {
Write-Host "- Sign-in to https://entra.microsoft.com" -ForegroundColor Green
Write-Host "- From the left navigation select: Identity → Monitoring & health → Sign-in logs." -ForegroundColor Green
Write-Host "- Select the 'Date' filter and set to 'Last 7 days'" -ForegroundColor Green
Write-Host "- Select 'Add filters' → 'Application' and type in: Azure" -ForegroundColor Green
Write-Host "- Select 'Download → Download JSON" -ForegroundColor Green
Write-Host "- Set the 'File Name' of the first textbox to 'signins' and select it's Download button." -ForegroundColor Green
Write-Host "- Select 'Add filters' → 'Application' and click 'Apply'" -ForegroundColor Green
Write-Host "- Type in 'Azure' and click 'Apply'" -ForegroundColor Green
Write-Host "- Select 'Download' → 'Download JSON'" -ForegroundColor Green
Write-Host "- Set the 'File Name' of the first textbox to 'signins' and click 'Download'." -ForegroundColor Green
Write-Host "- Once the file is downloaded, copy it to the folder where the export command will be run." -ForegroundColor Green
Write-Host
Write-Host "Re-run this command with the -SignInsJsonPath parameter." -ForegroundColor Green
Expand Down

0 comments on commit a52105a

Please sign in to comment.