Skip to content

Commit

Permalink
Merge pull request #665 from maester365/tnh-EidscaEntraFreeTenant
Browse files Browse the repository at this point in the history
Added Entra ID Free tenant license checks
  • Loading branch information
merill authored Feb 19, 2025
2 parents 35c895c + ac9bc29 commit c90d1e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion powershell/internal/eidsca/Test-MtEidscaPR05.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ function Test-MtEidscaPR05 {
[OutputType([bool])]
param()


if ( $EntraIDPlan -eq 'Free' ) {
Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason ''
return $null
}
$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

[int]$tenantValue = $result.values | where-object name -eq 'LockoutDurationInSeconds' | select-object -expand value
Expand Down
5 changes: 4 additions & 1 deletion powershell/internal/eidsca/Test-MtEidscaPR06.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ function Test-MtEidscaPR06 {
[OutputType([bool])]
param()


if ( $EntraIDPlan -eq 'Free' ) {
Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'This test is for tenants that are licensed for Entra ID P1 or higher. See [Entra ID licensing](https://learn.microsoft.com/entra/fundamentals/licensing)'
return $null
}
$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

[int]$tenantValue = $result.values | where-object name -eq 'LockoutThreshold' | select-object -expand value
Expand Down
4 changes: 2 additions & 2 deletions tests/EIDSCA/Test-EIDSCA.Generated.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Describe "Default Settings - Password Rule Settings" -Tag "EIDSCA", "Security",
}
}
Describe "Default Settings - Password Rule Settings" -Tag "EIDSCA", "Security", "All", "EIDSCA.PR05" {
It "EIDSCA.PR05: Default Settings - Password Rule Settings - Smart Lockout - Lockout duration in seconds. See https://maester.dev/docs/tests/EIDSCA.PR05" {
It "EIDSCA.PR05: Default Settings - Password Rule Settings - Smart Lockout - Lockout duration in seconds. See https://maester.dev/docs/tests/EIDSCA.PR05" -TestCases @{ EntraIDPlan = $EntraIDPlan } {
<#
Check if "https://graph.microsoft.com/beta/settings"
.values | where-object name -eq 'LockoutDurationInSeconds' | select-object -expand value -ge '60'
Expand All @@ -152,7 +152,7 @@ Describe "Default Settings - Password Rule Settings" -Tag "EIDSCA", "Security",
}
}
Describe "Default Settings - Password Rule Settings" -Tag "EIDSCA", "Security", "All", "EIDSCA.PR06" {
It "EIDSCA.PR06: Default Settings - Password Rule Settings - Smart Lockout - Lockout threshold. See https://maester.dev/docs/tests/EIDSCA.PR06" {
It "EIDSCA.PR06: Default Settings - Password Rule Settings - Smart Lockout - Lockout threshold. See https://maester.dev/docs/tests/EIDSCA.PR06" -TestCases @{ EntraIDPlan = $EntraIDPlan } {
<#
Check if "https://graph.microsoft.com/beta/settings"
.values | where-object name -eq 'LockoutThreshold' | select-object -expand value -eq '10'
Expand Down

0 comments on commit c90d1e7

Please sign in to comment.