Skip to content

Commit

Permalink
changed to transitive memberof for groups for flattening of nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Nov 30, 2020
1 parent 903d8f2 commit 6814961
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,7 @@ public function getMicrosoftGraphGroupMembership($user)
// Use the app access token to get a given users group membership
$graph = new \Microsoft\Graph\Graph();
$graph->setAccessToken($accessToken);
$path = '/users/'.$user->userPrincipalName.'/memberOf';
// $groups = $graph->createRequest('GET', $path)
// $graph->createCollectionRequest('GET', $path)->setReturnType(\Microsoft\Graph\Model\Group::class)->setPageSize(200)->execute();
$path = '/users/'.$user->azure_id.'/transitiveMemberOf';
$groups = $graph->createCollectionRequest('GET', $path)
->setReturnType(\Microsoft\Graph\Model\Group::class)
->setPageSize(900)
Expand Down

0 comments on commit 6814961

Please sign in to comment.