Answers for "microsoft graph to "ldap""

0

microsoft graph to "ldap"

private static async Task<string[]> GetUserGroupsAsync(HttpClient client, string user)
        {
            var payload = await client.GetStringAsync(
                $"https://graph.microsoft.com/v1.0/users/{user}/memberOf");
            var obj = JsonConvert.DeserializeObject<JObject>(payload);
            var groupDescription = from g in obj["value"]
                                   select g["displayName"].Value<string>();

            return groupDescription.ToArray();
        }
Posted by: Guest on September-02-2020

Code answers related to "microsoft graph to "ldap""

Browse Popular Code Answers by Language