Ejemplo n.º 1
0
        public async Task <IHttpActionResult> GetAllGroups()
        {
            try
            {
                string data = await Request.Content.ReadAsStringAsync();

                var query  = JsonConvert.DeserializeObject <LdapUserQuery>(data);
                var ldap   = new LdapHelper(query.Server);
                var groups = ldap.GetAllGroups();
                return(Ok(groups));
            }
            catch
            {
                return(NotFound());
            }
        }