Skip to content

Commit 21474e3

Browse files
authored
Update MSGraphService.cs (#235)
Missing AuthenticatedClient in GetMyMemberOfGroupsAsync()
1 parent ec4f613 commit 21474e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

5-WebApp-AuthZ/5-2-Groups/Services/MicrosoftGraph-Rest/MSGraphService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public async Task<UserGroupsAndDirectoryRoles> GetCurrentUserGroupsAndRolesAsync
277277
public async Task<List<Group>> GetMyMemberOfGroupsAsync(string accessToken)
278278
{
279279
List<Group> groups = new List<Group>();
280-
280+
PrepareAuthenticatedClient(accessToken);
281281
// Get groups the current user is a direct member of.
282282
IUserMemberOfCollectionWithReferencesPage memberOfGroups = await graphServiceClient.Me.MemberOf.Request().GetAsync();
283283
if (memberOfGroups?.Count > 0)
@@ -378,4 +378,4 @@ await Task.Run(() =>
378378
}
379379
}
380380
}
381-
}
381+
}

0 commit comments

Comments
 (0)