tagged [active-directory]

How to programmatically change Active Directory password

How to programmatically change Active Directory password I have a set of test accounts that are going to be created but the accounts will be setup to require password change on the first login. I want...

lookup user in ActiveDirectory by email address

lookup user in ActiveDirectory by email address How can I query an ActiveDirectory user by email address? A given user can have multiple emails such as both john.smite@acme.com and jsmith@acme.com. Fo...

6 Sep at 12:54

Authenticating in PHP using LDAP through Active Directory

Authenticating in PHP using LDAP through Active Directory I'm looking for a way to authenticate users through LDAP with PHP (with Active Directory being the provider). Ideally, it should be able to ru...

How do I find out where login scripts live?

How do I find out where login scripts live? I am looking for a way (manual or progamatic) to find out where the user's activer directory login script is located. I can parse the results of "net user" ...

19 Mar at 18:33

Unit tests for code accessing ActiveDirectory

Unit tests for code accessing ActiveDirectory What's the best way to unit test an application accessing the ActiveDirectory and/or mock the dependencies to the AD? All the required types such as `Dire...

How can I get DOMAIN\USER from an AD DirectoryEntry?

How can I get DOMAIN\USER from an AD DirectoryEntry? How can I get the Windows user and domain from an Active Directory DirectoryEntry (SchemaClassName="user") object? The user name is in the sAMAccou...

5 Jun at 14:17

How to keep the shell window open after running a PowerShell script?

How to keep the shell window open after running a PowerShell script? I have a very short PowerShell script that connects to a server and imports the AD module. I'd like to run the script simply by dou...

20 Jan at 13:49

Get members of Active Directory Group and check if they are enabled or disabled

Get members of Active Directory Group and check if they are enabled or disabled What is the fastest way to get a list of all members/users in a given AD group and determine whether or not a user is en...

30 Aug at 11:8

Built-in helper to parse User.Identity.Name into Domain\Username

Built-in helper to parse User.Identity.Name into Domain\Username Is there any built-in utility or helper to parse `HttpContext.Current.User.Identity.Name`, e.g. `domain\user` to get separately domain ...

How to get Active Directory Attributes not represented by the UserPrincipal class

How to get Active Directory Attributes not represented by the UserPrincipal class What I mean is that right now I am using System.DirectoryServices.AccountManagement and if I use UserPrincipal class I...

How can I get a list of users from active directory?

How can I get a list of users from active directory? How can I get a list of users from active directory? Is there a way to pull username, firstname, lastname? I saw a similar post where this was used...

31 Dec at 16:3

How do I get the AD Display Name of the currently logged in user

How do I get the AD Display Name of the currently logged in user Consider the following properties as set up in Active Directory for a user: ![enter image description here](https://i.stack.imgur.com/P...

14 Jul at 11:57

User/Group Permissions in Active Directory

User/Group Permissions in Active Directory Where can I find an example that does the following? 1. Pulls a user from Active Directory. 2. Gets the groups the user is a member of. 3. Gets a list of per...

27 Jul at 21:49

How to impersonate AD user in web service?

How to impersonate AD user in web service? I want my web service (using servicestack, if that matters) to be able to authenticate against the AD, and then switch identity to that user. I see quite a f...

How do I get specific properties with Get-AdUser

How do I get specific properties with Get-AdUser I have the following PS script written: `Get-ADUser -Filter * -SearchBase 'OU=Users & Computers, DC=aaaaaaa, DC=com' -Properties DisplayName | Export-C...

How to get the groups of a user in Active Directory? (c#, asp.net)

How to get the groups of a user in Active Directory? (c#, asp.net) I use this code to get the groups of the current user. But I want to manually give the user and then get his groups. How can I do thi...

24 Mar at 08:41

Public Active directory for testing

Public Active directory for testing I need to write some .NET code for listing user and groups. I am planing to use LINQ. I do not have access to the Active directory for testing. I do not have a serv...

9 Dec at 15:15

Accessing Active Directory from ASP.Net MVC using C#

Accessing Active Directory from ASP.Net MVC using C# I need to access Active Directory to get information about groups that customers belong to. The project I have is an ASP.Net MVC application using ...

How do I find a user's Active Directory display name in a C# web application?

How do I find a user's Active Directory display name in a C# web application? I'm writing a web application which uses windows authentication and I can happily get the user's login name using somethin...

10 Mar at 03:13

Get profile picture from Azure Active Directory

Get profile picture from Azure Active Directory We have set the Azure AD as a identity provider in our application. We want to display profile picture that should come from Azure AD, in the applicatio...

8 Nov at 15:21

How I get Active Directory User Properties with System.DirectoryServices.AccountManagement Namespace?

How I get Active Directory User Properties with System.DirectoryServices.AccountManagement Namespace? I want do get Active Directory Properties from a user and I want to use `System.DirectoryServices....

Identityserver 4 and Azure AD

Identityserver 4 and Azure AD I'm looking into using Identity Server 4 for authentication within a C# based MVC application. I'd like to use accounts stored in Azure AD as a source of valid users but ...

How to get a user's e-mail address from Active Directory?

How to get a user's e-mail address from Active Directory? I am trying to get a user's email address in AD without success. ``` String account = userAccount.Replace(@"Domain\", ""); DirectoryEntry entr...

26 Jul at 20:2

Get Name of User from Active Directory

Get Name of User from Active Directory I need to show only the name of a user from Active Directory, I am using This shows the users name but not the real name of the user, I've checked other question...

2 Feb at 15:36

Resolve domain address in/for Active Directory [.net]

Resolve domain address in/for Active Directory [.net] Is there a simple way to resolve the Active Directory path of a Domain name in Active Directory? E.g. your user account might be SITE\Username or ...

15 Jul at 04:37