You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Oldest active relationship wins - relationship age should not reset
90
+
# when an additional/replacement relationship is accepted later.
91
+
if (-not$AgeMap.ContainsKey($RelCustomerId) -or$AgeMap[$RelCustomerId] -lt$AgeDays) {
92
+
$AgeMap[$RelCustomerId] =$AgeDays
93
+
}
94
+
}
95
+
$GdapAgeByCustomer=$AgeMap
96
+
} catch {
97
+
Write-LogMessage-API 'TenantGroups'-message "Failed to get GDAP relationships for dynamic group evaluation: $((Get-NormalizedError-Message $_.Exception.Message))"-sev Error
98
+
}
99
+
}
100
+
if ($null-eq$GdapAgeByCustomer) {
101
+
throw'Could not retrieve GDAP relationships, skipping this group so existing membership is preserved.'
102
+
}
103
+
}
104
+
74
105
$TenantObj=foreach ($Tenantin$AllTenants) {
75
106
$LicenseInfo=$null
76
107
$SKUId=@()
@@ -126,6 +157,7 @@ function Update-CIPPDynamicTenantGroups {
0 commit comments