Skip to content

Commit 61b7f5c

Browse files
authored
Merge pull request KelvinTegelaar#1343 from kris6673/fix-entra-license-alert
Fix: Entra license utilization check to include P2 licenses in P1 entitled check
2 parents 821bbe1 + c73735f commit 61b7f5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/CIPPCore/Public/Alerts/Get-CIPPAlertEntraLicenseUtilization.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ function Get-CIPPAlertEntraLicenseUtilization {
1818
$Alerts = [System.Collections.Generic.List[string]]::new()
1919

2020
# Check P1 License utilization
21-
if ($LicenseData.entitledP1LicenseCount -gt 0) {
21+
if ($LicenseData.entitledP1LicenseCount -gt 0 -or $LicenseData.entitledP2LicenseCount -gt 0) {
2222
$P1Used = $LicenseData.p1FeatureUtilizations.conditionalAccess.userCount
23-
$P1Entitled = $LicenseData.entitledP1LicenseCount
23+
$P1Entitled = $LicenseData.entitledP1LicenseCount + $LicenseData.entitledP2LicenseCount
2424
$P1Usage = ($P1Used / $P1Entitled) * 100
2525
$P1Overage = $P1Used - $P1Entitled
2626

0 commit comments

Comments
 (0)