active-directory-group

Windows / Active Directory - User / Groups

南楼画角 提交于 2020-02-02 03:06:05
问题 I'm looking for a way to find a the windows login associated with a specific group. I'm trying to add permissions to a tool that only allows names formatted like: DOMAIN\USER DOMAIN\GROUP I have a list of users in active directory format that I need to add: ou=group1;ou=group2;ou=group3 I have tried adding DOMAIN\Group1, but I get a 'user not found' error. P.S. should also be noted that I'm not a Lan admin 回答1: Programatically or Manually? Manually, i prefer AdExplorer, which is a nice Active

Windows / Active Directory - User / Groups

 ̄綄美尐妖づ 提交于 2020-02-02 03:05:27
问题 I'm looking for a way to find a the windows login associated with a specific group. I'm trying to add permissions to a tool that only allows names formatted like: DOMAIN\USER DOMAIN\GROUP I have a list of users in active directory format that I need to add: ou=group1;ou=group2;ou=group3 I have tried adding DOMAIN\Group1, but I get a 'user not found' error. P.S. should also be noted that I'm not a Lan admin 回答1: Programatically or Manually? Manually, i prefer AdExplorer, which is a nice Active

Notify me when events in Active Directory occur in C#

时间秒杀一切 提交于 2020-01-06 03:49:05
问题 I need to get notification when certain events occur in Active Directory using LDAP protocol. Events that should be triggered are: When a certain AD group is associated to a user. And if a field (like phone number) has changed in AD user. I searched all internet but mostly solutions are based on the code on the end of this article: Registering change notification with Active Directory using C# As mentioned in that article there are 3 ways to do it: Using USNChanged Using the DirSync Control

asp.net application userprincipal.findbyidentity works with browser on server, throws exception from my machine

前提是你 提交于 2020-01-04 15:13:53
问题 I have an application that is running on an IIS 7 server, in this program I need to find all the groups that the current user is a member of. When I access the website using the browser on the server, it works perfectly, but when I try to access it from my machine it keeps throwing a COM exception, Here is the code I'm using to get the user groups. private List<string> GetUserGroups(string userName) { //The list of strings for output. List<string> output= new List<string>(); try { //creating

ASP.NET Membership - Which RoleProvider to use so User.IsInRole() checks ActiveDirectory Groups?

杀马特。学长 韩版系。学妹 提交于 2019-12-31 22:22:42
问题 Very simple question actually: I currently have IIS anonymous access disabled, users are automatically logged on using their Windows login. However calling User.IsInRole("Role name") returns false. I double-checked User.Identity.Name() and the "Role name" and it should return true. I currently have this in my Web.Config: UPDATE I was calling User.IsInRole("Role name") where I should call User.IsInRole("DOMAIN\Role name") However I still like to know if the <membership> entry is needed at all?

See if user is part of Active Directory group in C# + Asp.net

家住魔仙堡 提交于 2019-12-28 02:24:05
问题 I need a way to see if a user is part of an active directory group from my .Net 3.5 asp.net c# application. I am using the standard ldap authentication example off of msdn but I don't really see how to check against a group. 回答1: With 3.5 and System.DirectoryServices.AccountManagement this is a bit cleaner: public List<string> GetGroupNames(string userName) { var pc = new PrincipalContext(ContextType.Domain); var src = UserPrincipal.FindByIdentity(pc, userName).GetGroups(pc); var result = new

Get recursive group membership of all AD users using Powershell

血红的双手。 提交于 2019-12-24 00:59:37
问题 I'm trying to make a PS script which would list all Active Directory user group membership (recursive). I already have working script: import-module activedirectory $users = get-aduser -Filter {Name -Like "*"} -Searchbase "ou=Users, dc=Domain" | Where-Object { $_.Enabled -eq 'True' } $targetFile = "D:\users.csv" rm $targetFile Add-Content $targetFile "User;Group" foreach ($user in $users) { $groups = Get-ADPrincipalGroupMembership $user foreach ($group in $groups) { $username = $user

Find out if a group in AD is in Distribution group?

佐手、 提交于 2019-12-23 09:04:02
问题 I'm using ASP.net with C# and have a very little idea about Active Directory. I've been given a task to write a program in steps below: The ASP.net application is given the username of a user. The application should query all the groups of the user with the given username. Then the application should display these groups in two separate lists one consisting of the distribution groups and in other list, the rest of the groups. Now, the querying for all the groups is easy. But how can I check

Reading/Filtering Distribution Group's Subgroups of an active directory?

让人想犯罪 __ 提交于 2019-12-22 15:37:30
问题 I've an Active Directory with domain myDomain.local , under it there exists a Distribution Group that contains many groups. How can I read (programmatically) all these subgroups to retrieve a list of their names ? And how to optimize the query to filter the result so that it just retrieves all the groups that ends with the word Region ? BTW, I'm using C#.Net, ASP.Net and sharepoint, and i'm not experienced with AD. 回答1: If you're on .NET 3.5 (or can upgrade to it), you can use this code using