File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,14 @@ function Test-CIPPGDAPRelationships {
5757 )
5858 $RoleAssignableGroups = $SAMUserMemberships | Where-Object { $_.isAssignableToRole }
5959 $NestedGroups = foreach ($Group in $RoleAssignableGroups ) {
60+ Write-Information " Getting nested group memberships for $ ( $Group.displayName ) "
6061 New-GraphGetRequest - uri " https://graph.microsoft.com/beta/groups/$ ( $Group.id ) /memberOf?`$ select=id,displayName" - NoAuthCheck $true
6162 }
6263 foreach ($Group in $ExpectedGroups ) {
6364 $GroupFound = $false
6465 foreach ($Membership in ($SAMUserMemberships + $NestedGroups )) {
65- if ($Membership.displayName -match $Group -and (($CIPPGroupCount -gt 0 -and $Group -match ' M365 GDAP' ) -or $Group -notmatch ' M365 GDAP' )) {
66+ if ($Membership.displayName -match $Group ) {
67+ Write-Information " Found $Group in group memberships"
6668 $GroupFound = $true
6769 }
6870 }
You can’t perform that action at this time.
0 commit comments