Number of Users in a role

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Number of Users in a role

    Hi,

    I am trying to work out how I can find the number of users in a role. So
    that I can lock the application after a certain number of users are added to
    that role.

    Does any one know of decent reference material in dealing with windows users
    and roles?

    Cathie


    Cathie Guest

  2. Similar Questions and Discussions

    1. Help - How to create new roles and assign users to each role
      Hi everybody, I've seen many examples of web.config file where I can give permission to users or roles, for example: <authorization> <deny...
    2. Active Directory Role-Based Authentication Fails for Users - Local
      Developed a web-based application that queries active directory for roles to associate the appropriate functionality to the user. After a recent...
    3. Number of users at a particular site
      http://www.free-midi.org/scripts/ Does that fit your needs? Always trying to help ---------------------------------------- The post...
    4. Maximun Number of Users
      Hi I wonder if anyone can help me with this please. I am trying to increase the number of users on our informix database (5.10!! I know I...
    5. Restricting number of users for my Network CD
      HI Everybody: I have developed a CDROM product using Director for the Intranet. I am wondering how to control the number of users accessing the...
  3. #2

    Default Re: Number of Users in a role

    Are you talking about a role as in a Windows group a role you created in
    your own code. .NET has a very flexible system that supports both.

    In general, there are no .NET APIs that support this directly, but you might
    be able to do something based on the specific implementation of the role.

    Joe K.

    "Cathie" <cathie@somewhere.com> wrote in message
    news:OY4KncMNFHA.2736@TK2MSFTNGP09.phx.gbl...
    > Hi,
    >
    > I am trying to work out how I can find the number of users in a role. So
    > that I can lock the application after a certain number of users are added
    > to that role.
    >
    > Does any one know of decent reference material in dealing with windows
    > users and roles?
    >
    > Cathie
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  4. #3

    Default Re: Number of Users in a role

    I am looking for the number of users in a specific Windows group. I think I
    know how to do it now, it just means that I will have to recursively search
    the AD tree using DirectorySearch to and count the result.

    Cathie

    "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    in message news:OH7Da5gNFHA.2580@TK2MSFTNGP09.phx.gbl...
    > Are you talking about a role as in a Windows group a role you created in
    > your own code. .NET has a very flexible system that supports both.
    >
    > In general, there are no .NET APIs that support this directly, but you
    > might be able to do something based on the specific implementation of the
    > role.
    >
    > Joe K.
    >
    > "Cathie" <cathie@somewhere.com> wrote in message
    > news:OY4KncMNFHA.2736@TK2MSFTNGP09.phx.gbl...
    >> Hi,
    >>
    >> I am trying to work out how I can find the number of users in a role. So
    >> that I can lock the application after a certain number of users are added
    >> to that role.
    >>
    >> Does any one know of decent reference material in dealing with windows
    >> users and roles?
    >>
    >> Cathie
    >>
    >
    >

    Cathie Guest

  5. #4

    Default Re: Number of Users in a role

    It is actually pretty hard to do this in general, but that is the basic
    idea. You need to enumerate the members and then enumerate the members of
    those groups that are also groups. If any of the groups have large numbers
    of members (greater than maxRangeValue for your domain, typically 1000 for
    win2k and 1500 for 2k3), then you'll also need some range retrieval.

    Also, if any of those groups is the primary group, the membership isn't
    included in the member attribute, so you need a different approach
    altogether.

    Why do you need to do this anyway?

    Joe K.

    "Cathie" <cathie@somewhere.com> wrote in message
    news:OUd9aekNFHA.3336@TK2MSFTNGP09.phx.gbl...
    >I am looking for the number of users in a specific Windows group. I think
    >I know how to do it now, it just means that I will have to recursively
    >search the AD tree using DirectorySearch to and count the result.
    >
    > Cathie
    >
    > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    > in message news:OH7Da5gNFHA.2580@TK2MSFTNGP09.phx.gbl...
    >> Are you talking about a role as in a Windows group a role you created in
    >> your own code. .NET has a very flexible system that supports both.
    >>
    >> In general, there are no .NET APIs that support this directly, but you
    >> might be able to do something based on the specific implementation of the
    >> role.
    >>
    >> Joe K.
    >>
    >> "Cathie" <cathie@somewhere.com> wrote in message
    >> news:OY4KncMNFHA.2736@TK2MSFTNGP09.phx.gbl...
    >>> Hi,
    >>>
    >>> I am trying to work out how I can find the number of users in a role.
    >>> So that I can lock the application after a certain number of users are
    >>> added to that role.
    >>>
    >>> Does any one know of decent reference material in dealing with windows
    >>> users and roles?
    >>>
    >>> Cathie
    >>>
    >>
    >>
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  6. #5

    Default Re: Number of Users in a role

    Named user check - for licensing issues :)

    "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    in message news:OV%23Q1nkNFHA.3788@tk2msftngp13.phx.gbl...
    > It is actually pretty hard to do this in general, but that is the basic
    > idea. You need to enumerate the members and then enumerate the members of
    > those groups that are also groups. If any of the groups have large
    > numbers of members (greater than maxRangeValue for your domain, typically
    > 1000 for win2k and 1500 for 2k3), then you'll also need some range
    > retrieval.
    >
    > Also, if any of those groups is the primary group, the membership isn't
    > included in the member attribute, so you need a different approach
    > altogether.
    >
    > Why do you need to do this anyway?
    >
    > Joe K.
    >
    > "Cathie" <cathie@somewhere.com> wrote in message
    > news:OUd9aekNFHA.3336@TK2MSFTNGP09.phx.gbl...
    >>I am looking for the number of users in a specific Windows group. I think
    >>I know how to do it now, it just means that I will have to recursively
    >>search the AD tree using DirectorySearch to and count the result.
    >>
    >> Cathie
    >>
    >> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>
    >> wrote in message news:OH7Da5gNFHA.2580@TK2MSFTNGP09.phx.gbl...
    >>> Are you talking about a role as in a Windows group a role you created in
    >>> your own code. .NET has a very flexible system that supports both.
    >>>
    >>> In general, there are no .NET APIs that support this directly, but you
    >>> might be able to do something based on the specific implementation of
    >>> the role.
    >>>
    >>> Joe K.
    >>>
    >>> "Cathie" <cathie@somewhere.com> wrote in message
    >>> news:OY4KncMNFHA.2736@TK2MSFTNGP09.phx.gbl...
    >>>> Hi,
    >>>>
    >>>> I am trying to work out how I can find the number of users in a role.
    >>>> So that I can lock the application after a certain number of users are
    >>>> added to that role.
    >>>>
    >>>> Does any one know of decent reference material in dealing with windows
    >>>> users and roles?
    >>>>
    >>>> Cathie
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >

    Cathie Guest

  7. #6

    Default Re: Number of Users in a role

    Gotcha. Good luck then! Make sure you test with large group memberships, a
    mix of security and non-security groups and nested groups from other
    domains. There are a variety of ways that this thing can get very
    complicated and blow and give you trouble.

    Joe K.

    "Cathie" <cathie@somewhere.com> wrote in message
    news:eL8UqpKOFHA.3076@TK2MSFTNGP14.phx.gbl...
    > Named user check - for licensing issues :)
    >
    > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    > in message news:OV%23Q1nkNFHA.3788@tk2msftngp13.phx.gbl...
    >> It is actually pretty hard to do this in general, but that is the basic
    >> idea. You need to enumerate the members and then enumerate the members
    >> of those groups that are also groups. If any of the groups have large
    >> numbers of members (greater than maxRangeValue for your domain, typically
    >> 1000 for win2k and 1500 for 2k3), then you'll also need some range
    >> retrieval.
    >>
    >> Also, if any of those groups is the primary group, the membership isn't
    >> included in the member attribute, so you need a different approach
    >> altogether.
    >>
    >> Why do you need to do this anyway?
    >>
    >> Joe K.
    >>

    Joe Kaplan \(MVP - ADSI\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139