Beispiel #1
0
        private async Task <SortedDictionary <string, string> > GetGroupMembers(SortedDictionary <string, string> groups)
        {
            //https://docs.microsoft.com/en-us/graph/api/group-list-members
            SortedDictionary <string, string> users = new SortedDictionary <string, string>();
            HomeHelper helper = new HomeHelper();

            foreach (string s in groups.Values)
            {
                var members = await _graphServiceClient.Groups[s].Members
                              .Request()
                              .GetAsync();

                users = helper.UsersToDictionary(users, members);
            }

            return(users);
        }