Skip to content

Commit 2cdcbd6

Browse files
authored
Merge pull request #87 from nathanmcnulty/main
Add Azure mobile app, M365 admin center, Excel formatting
2 parents d836fd9 + 069bcbb commit 2cdcbd6

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

src/Export-MsIdAzureMfaReport.ps1

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@ function Export-MsIdAzureMfaReport {
199199
$headerBgColour = [System.Drawing.ColorTranslator]::FromHtml("#0077b6")
200200
$darkGrayColour = [System.Drawing.ColorTranslator]::FromHtml("#A9A9A9")
201201
$styles = @(
202-
New-ExcelStyle -Range "A1:J$maxRows" -Height 20 -FontSize 14
203-
New-ExcelStyle -Range "A1:J1" -FontColor White -BackgroundColor $headerBgColour -Bold -HorizontalAlignment Center
202+
New-ExcelStyle -Range "A1:L$maxRows" -Height 20 -FontSize 14
203+
New-ExcelStyle -Range "A1:L1" -FontColor White -BackgroundColor $headerBgColour -Bold -HorizontalAlignment Center
204204
New-ExcelStyle -Range "A2:A$maxRows" -FontColor Blue -Underline
205205
New-ExcelStyle -Range "D2:D$maxRows" -FontColor Blue -Underline
206-
New-ExcelStyle -Range "E2:G$maxRows" -FontColor Blue -HorizontalAlignment Center
206+
New-ExcelStyle -Range "E2:I$maxRows" -FontColor Blue -HorizontalAlignment Center
207207
New-ExcelStyle -Range "C2:C$maxRows" -HorizontalAlignment Center
208-
New-ExcelStyle -Range "I2:I$maxRows" -FontColor $darkGrayColour -HorizontalAlignment Fill
208+
New-ExcelStyle -Range "L2:L$maxRows" -FontColor $darkGrayColour -HorizontalAlignment Fill
209209
)
210210

211211
$authMethodBlade = 'https://entra.microsoft.com/#view/Microsoft_AAD_UsersAndTenants/UserProfileMenuBlade/~/UserAuthMethods/userId/%id%/hidePreviewBanner~/true'
@@ -221,6 +221,8 @@ function Export-MsIdAzureMfaReport {
221221
@{name = 'Az Portal'; expression = { GetTickSymbol $_.AzureAppName "Azure Portal" } }, `
222222
@{name = 'Az CLI'; expression = { GetTickSymbol $_.AzureAppName "Azure CLI" } }, `
223223
@{name = 'Az PowerShell'; expression = { GetTickSymbol $_.AzureAppName "Azure PowerShell" } }, `
224+
@{name = 'Az Mobile App'; expression = { GetTickSymbol $_.AzureAppName "Azure mobile app" } }, `
225+
@{name = 'M365 Admin Portal'; expression = { GetTickSymbol $_.AzureAppName "Microsoft 365 Admin portal" } }, `
224226
@{name = 'Authentication Methods'; expression = { $_.AuthenticationMethods -join ', ' } }, UserId, `
225227
@{name = 'Notes'; expression = { if (![string]::IsNullOrEmpty($_.Notes)) { $_.Notes } } } `
226228

@@ -236,13 +238,15 @@ function Export-MsIdAzureMfaReport {
236238
$sheet.Column(1).Width = 35 #DisplayName
237239
$sheet.Column(2).Width = 35 #UPN
238240
$sheet.Column(3).Width = 6 #MFA Icon
239-
$sheet.Column(4).Width = 34 #MFA Registered
240-
$sheet.Column(5).Width = 17 #Azure Portal
241-
$sheet.Column(6).Width = 17 #Azure CLI
242-
$sheet.Column(7).Width = 17 #Azure PowerShell
243-
$sheet.Column(8).Width = 40 #AuthenticationMethods
244-
$sheet.Column(9).Width = 15 #UserId
245-
$sheet.Column(10).Width = 30 #Notes
241+
$sheet.Column(4).Width = 37 #MFA Registered
242+
$sheet.Column(5).Width = 12 #Azure Portal
243+
$sheet.Column(6).Width = 10 #Azure CLI
244+
$sheet.Column(7).Width = 18 #Azure PowerShell
245+
$sheet.Column(8).Width = 17 #Azure mobile app
246+
$sheet.Column(9).Width = 23 #M365 Admin portal
247+
$sheet.Column(10).Width = 40 #AuthenticationMethods
248+
$sheet.Column(11).Width = 45 #UserId
249+
$sheet.Column(12).Width = 30 #Notes
246250

247251
Add-ConditionalFormatting -Worksheet $sheet -Range "C2:C$maxRows" -ConditionValue '=$C2="✅"' -RuleType Expression -ForegroundColor Green
248252
Add-ConditionalFormatting -Worksheet $sheet -Range "C2:C$maxRows" -ConditionValue '=$C2="❌"' -RuleType Expression -ForegroundColor Red

src/Get-MsIdAzureUsers.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ function Get-MsIdAzureUsers {
5858
@{
5959
AppId = "1950a258-227b-4e31-a9cf-717495945fc2"
6060
DisplayName = "Microsoft Azure PowerShell"
61+
},
62+
@{
63+
AppId = "0c1307d4-29d6-4389-a11c-5cbe7f65d7fa"
64+
DisplayName = "Azure mobile app"
65+
},
66+
@{
67+
AppId = "618dd325-23f6-4b6f-8380-4df78026e39b"
68+
DisplayName = "Microsoft 365 Admin portal"
6169
}
6270
)
6371

0 commit comments

Comments
 (0)