Skip to content

Commit 1883a42

Browse files
author
rvdwegen
committed
unique tenants log
1 parent b783c3d commit 1883a42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ function Get-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" -NoAuthCheck:$true
9898
Write-Host "GDAP relationships found: $($GDAPRelationships.Count)"
9999
Write-Information "GDAP relationships found: $($GDAPRelationships.Count)"
100-
$totalTenants = $GDAPRelationships.customer.tenantId.Count | Select-Object -Unique
101-
Write-Information "Total tenants found in relationships result: $totalTenants"
100+
$totalTenants = $GDAPRelationships.customer.tenantId | Select-Object -Unique
101+
Write-Information "Total tenants found in relationships result: $($totalTenants.count)"
102102
$GDAPList = foreach ($Relationship in $GDAPRelationships) {
103103
[PSCustomObject]@{
104104
customerId = $Relationship.customer.tenantId

0 commit comments

Comments
 (0)