Skip to content

Commit 85a265c

Browse files
committed
Update Get-CIPPLicenseOverview.ps1
1 parent 7fc53fd commit 85a265c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Modules/CIPPCore/Public/Get-CIPPLicenseOverview.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ function Get-CIPPLicenseOverview {
2020
}
2121
)
2222

23-
$AdminPortalLicenses = New-GraphGetRequest -scope 'https://admin.microsoft.com/.default' -TenantID $TenantFilter -Uri 'https://admin.microsoft.com/admin/api/tenant/accountSkus'
23+
try {
24+
$AdminPortalLicenses = New-GraphGetRequest -scope 'https://admin.microsoft.com/.default' -TenantID $TenantFilter -Uri 'https://admin.microsoft.com/admin/api/tenant/accountSkus'
25+
} catch {
26+
Write-Warning 'Failed to get Admin Portal Licenses'
27+
}
2428

2529
$Results = New-GraphBulkRequest -Requests $Requests -TenantID $TenantFilter -asapp $true
2630
$LicRequest = ($Results | Where-Object { $_.id -eq 'subscribedSkus' }).body.value

0 commit comments

Comments
 (0)