active-directory

AD via LDAP - How can I return all ancestor groups from a query?

I am querying Active Directory via LDAP (from Java and PHP) to build a list of all groups that a user is a member of. This list must contain all least all groups (organizational-units optional) that contain groups the user is directly a member of. For example: User1 is a member of GroupA, GroupB, and GroupC. GroupA is a member of Group...

Storing Password Reset Questions in LDAP

I want to store answers to password reset questions in LDAP. I know that the answers should be hashed with a salt. I would like insight into the following: What attributeClass should we use? Is it possible to get the LDAP server to perform the hashing operations? Is there a way to use the LDAP compare operation if the container doesn't...

C#: How to figure out, if a Windows Account is Password proteced

I want to know, if a WindowsAccount is Password protected. For security reasons, you cannot get the Password, that’s clear, but there must be a way, to find out, if a Password is set. public bool IsAccountPasswordProteced(String userName) { String entryString = "WinNT://" + Environment.MachineName + ",Computer"; DirectoryEntry ...

LDAP query for all users in sub OUs within a particular OU

The active directory I have to deal with is laid out as such: the domain contains many OUs. One of these OUs is named "Primary OU". Within this OU are several OUs named with location of global offices (ie "Chicago" "Paris"). Any user account that is an actual flesh and bone person is put into the OU named for the office they work in as...

VBScript: Using WScript.Shell to Execute a Command Line Program That Accesses Active Directory

I'm attempting to execute a .NET (3.5) command line program from within a VBScript file which does two main things: Connects to an Active Directory that is on the same domain as the server the script is hosted to retrieve an attribute value. I search AD using the first command line argument which is a username. Creates a DTO using sai...

How can I get a Kerberos ticket with Delphi?

Are there examples which show how Delphi invokes the Active Directory Kerberos server to request a ticket granting ticket / normal ticket? Background: the ticket is required for authentification to a web service which exchanges confidential information. Edit: a short source code example would be very helpful. I have found the JEDI Wind...

Recordset only returning 1000 records

I'm doing an ADODB recordset.open() command with an LDAP query to get all the users from my Active Directory. There are about 2600 users, but I'm only getting back 1000 of them. I've tried altering the recordset's PageSize and MaxRecords properties with no luck. Without extraneous stuff, this is what the code looks like (I've made th...

How do I create a contact with LDAP and have it show up in the GAL?

I can create a contact that is not mail enabled, but how do I mail enable it and have it show up in the Global Address List? Is it just a matter of setting more attributes or is there something more involved. ...

ADAM - Is there a way to "store" application specific attributes?

Hi Everyone, I have ADAM set-up & I've written web-services to complete admin tasks like adding new users etc. (I have multiple applications utilising the same ADAM instance) What I am trying to achieve will probably sound a bit odd - but basically I want an admin user to be able to select which attributes the web service should retu...

How to get streetaddress property of an organizational unit in windows active directory with LDAP in C#.Net

Each of our users is assigned to a primary organizational unit (OU) based on which global office they are in. So the "Chicago" OU contains all the associates in our Chicago office. Using c# and .net 3.5, my task is to extract all of these users. Unless the users are in a satellite or home office, their street address, city, state, etc....

IIS / DirectoryEntry / ASP.NET - Logon Failure

Update Putting this at the top because it is crazy :) So some users have it work, some don't. When I use my own account via IE7 it doesn't work (my code catches the exception and falls back to simply using the identity name instead of the AD fullname). When I try via Chrome it prompts me for the username and password, which I supply,...

vb.net active directory question - rename user account and mailbox

I'm trying to rename a user programically and can't figure out the mailbox piece(proxyAddresses). Any help is appreciated... Working code below... Public Shared Function renameUser(ByVal curUsername As String, ByVal newUsername As String) As Boolean Dim emailSuffix As String = "@here.com" Dim userPrincipalSuffix As String = "@...

How to know if my DirectoryEntry is really connected to my LDAP directory ?

I'm connecting to a LDAP directory in C#, so I've used the DirectoryEntry class. When you do the "new DirectoryEntry" with address, login, and password it is supposed to connect to the LDAP directory. However, even if the connection didn't work, it returns without problem, and the directoryentry variable is set. So i do i know my conn...

Unable to get members of Universal Distribution List using Powershell

I am trying to write a script to list out all members of a "Universal Distribution List" using Powershell. However I keep getting an empty result set back. When I run the following command against a "Global Distribution List" it works fine and I can see who belongs to it. dsquery group -name "SomeGroup" | dsget group -members -expand ...

Available fields for ADSI Linked in SQL Server

We currently have a View that queries active directory info. I was wondering if there was a good reference as to what fields (field names) are available in AD for me to query against. I don't have access to Active Directory so I can't go playing around in there to maybe figure it out myself. Any help would be appreciated. ...

Syncronizing database from Active Directory

Hello. I want to synchronize my user database with the users and groups from active directory. My application reads the objects from AD and copies them to the database but gets outdated as AD changes. Is there a way I can get active directory to notify me when a object is changed ? C# sample code would be great. Fábio P.S. I´m usung...

How to programaticly 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 to write a program in C# to go through the test accounts and change the passwords. ...

Impersonate using Forms Authentication

I have an ASP.NET site that must use Forms Authentication and not Windows Authentication to access a ActiveDirectoryMembershipProvider. The site must use forms because they need a designed input form instead of the browser authentication popup that Windows authentication uses. The site needs to impersonate the user logged in via Active...

How to create a new user in SharePoint when the user doesn't exist in AD?

Hi all: I have to import a lot of old data into SharePoint. In this data, I need to create a lot of users who are no longer in AD. Does anyone have any idea how to do that? Cheers ...

Active Directory GUID

I need a unique GUID that never changes per user in active directory... I see objectguid, msExchMailboxGUID, attributesecurityguid but not sure which one to use. I think objectguid is what I want but I'm not positive. Any suggestions? ...