Skip to content

Commit aa0fc23

Browse files
author
rvdwegen
committed
temp tenant count feedback
1 parent 9fb0f85 commit aa0fc23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Modules/CIPPCore/Public/GraphHelper/Get-Tenants.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ function Get-Tenants {
9595
}
9696
#get the full list of tenants
9797
$GDAPRelationships = New-GraphGetRequest -uri "https://graph.microsoft.com/beta/tenantRelationships/delegatedAdminRelationships?`$filter=status eq 'active' and not startsWith(displayName,'MLT_')$RelationshipFilter&`$select=customer,autoExtendDuration,endDateTime&`$top=300" -NoAuthCheck:$true
98+
Write-Host "GDAP relationships found: $($GDAPRelationships.Count)"
99+
$totalTenants = $GDAPRelationships.customer.tenantId.Count | Select-Object -Unique
100+
Write-Host "Total tenants found in relationships result: $totalTenants"
98101
$GDAPList = foreach ($Relationship in $GDAPRelationships) {
99102
[PSCustomObject]@{
100103
customerId = $Relationship.customer.tenantId

0 commit comments

Comments
 (0)