How to get AD User Groups for user in Asp.Net?

前端 未结 1 1657
眼角桃花
眼角桃花 2021-01-20 09:06

I need to be able to get a list of the groups a user is in, but I need to have one/some/all of the following properties visible:

  • distinguishedname
  • nam
1条回答
  •  清酒与你
    2021-01-20 10:09

    You cannot do this in one step, as groups are also separate AD entries with properties.

    So in the first run you should get the group names a user is in and fill them in a list of some kind.

    The second step is to go through all of the group names and query them one by one to get the group properties (like distinguishedname, and so on) and collect it to some kind of structure.

    0 讨论(0)
提交回复
热议问题