Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. AD group

AD group

Scheduled Pinned Locked Moved C#
comhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    caiena
    wrote on last edited by
    #1

    i am running the method to get all my users in a group my only problem is it only get the first 1000 users i have 2500 users in this group how do i change the capacity to 3000 public static ArrayList getUsers() { ArrayList excludeGroups = new ArrayList(); ArrayList users = new ArrayList(); excludeGroups.Add("CN=GMDPortal,OU=IT,OU=ADM,DC=corp,DC=ad,DC=ejhospital,DC=com"); foreach (string DEgroup in excludeGroups) { DirectoryEntry group = new DirectoryEntry("LDAP://" + DEgroup); foreach (object dn in group.Properties["member"]) { users.Add(dn); } } return users; }

    T 1 Reply Last reply
    0
    • C caiena

      i am running the method to get all my users in a group my only problem is it only get the first 1000 users i have 2500 users in this group how do i change the capacity to 3000 public static ArrayList getUsers() { ArrayList excludeGroups = new ArrayList(); ArrayList users = new ArrayList(); excludeGroups.Add("CN=GMDPortal,OU=IT,OU=ADM,DC=corp,DC=ad,DC=ejhospital,DC=com"); foreach (string DEgroup in excludeGroups) { DirectoryEntry group = new DirectoryEntry("LDAP://" + DEgroup); foreach (object dn in group.Properties["member"]) { users.Add(dn); } } return users; }

      T Offline
      T Offline
      The Man from U N C L E
      wrote on last edited by
      #2

      the LDAP policy on your domain controler has a setting, MaxPageSize . This is the maximum number of records the Active directory will return in any query result set. The default setting is 1000. You will have to ask your domain administrator to change that setting for you.

      If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) www.JacksonSoft.co.uk

      C 1 Reply Last reply
      0
      • T The Man from U N C L E

        the LDAP policy on your domain controler has a setting, MaxPageSize . This is the maximum number of records the Active directory will return in any query result set. The default setting is 1000. You will have to ask your domain administrator to change that setting for you.

        If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) www.JacksonSoft.co.uk

        C Offline
        C Offline
        caiena
        wrote on last edited by
        #3

        is there a method that i can query Ad in group lets say i wanted to get them is groups of 500 until i get all of them example

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups