active-directory

How do I change Remote Desktop Services properties of AD users in .NET?

I need to set properties related to Remote Desktop Services on Active Directory users in .NET (i.e., via System.DirectoryServices), but I can't see that these properties are exposed by the API? I know there is a COM interface for this purpose, IADsTSUserEx. Please show me how I can get at these properties in .NET :) Bear in mind that the...

Find domain of a user from Active Directory

Wrote a java code to search for users from Active Directory server. We get the user list but dont know the domain to which each user belongs. How can the domain of the user be found from Active Directory programatically. One method thought of is : 1)Get the distinguished name of user from Active Directory. 2)Parse the distinguished nam...

How to authenticate a user with Active Directory from a client using Integrated Windows Security?

In our client/server application, a user can log in using a username/password. The server then authenticate the user from its local user database or from the active directory if the user is not found in the local database. For this scenario everythings is secure. But we want to implement an "Integrated Security" mode on the client to us...

Adding User to AD Security Group fails after user creation

I am using a WCF service to expose certain Active Directory management functions to our help desk staff without giving them the group membership required to manipulate AD directly. Adding users to and removing users from groups is working like a champ with existing users, but every time I create a new user it throws back this fun code: ...

Active Directory Custom User Profiles/Attributes?

Hi all, I am currently using the ActiveDirectoryMembershipProvider just for authentication on an internal business app built in asp.net. This works like a charm. I am now looking to add some functionality to handle custom profile information for a user, ideally also stored in Active Directory. For a simple example let's just say the c...

Active Directory Programming help needed

Hello Friends, I want to make Windows Service in .NET which has to run on Windows Server 2003, 2008. The main functionalities i need are: As soon as a network user logs in, Display his: User name in Active Directory Domain Ip Address from where he connected I do not want to install or run any program/script on the client machine. ...

Find Users E-Mail via SID using VBScript and Active Directory

Hi, I am parsing log messages about changes to user accounts on a windows system. I want to notify the user about the changes so I need to retrieve their personal information (First,Last, E-Mail) from Active Directory. I already found a way to retrieve the username but that is only via WMI and not ADSI: Function FindUser(Message) ...

Can php ldap authentication with active directory send client IP instead of server IP?

Hi All, When authenticating to ldap using the following php code: $ldap = ldap_connect("ldap.example.com") if($bind = ldap_bind($ldap, $_POST['username'], $_POST['password'])) { // log them in! } else { // error message } Is there any way to sent the client IP address to the AD server rather than the server IP? ...

DirectoryEntry Timeout

I am having an issue with the DirectoryEntry object where it's taking a long time trying to connect to to a dead AD server and eventually failing. Is it possible to set a timeout so that if its not able to connect within a specific time, it just comes out to try the next one? ...

Security problems with Silverlight 3 application

I have a Silverlight 3 Application and for security I'm using Active Directory. For some reason that I can't explain whenever I access my app in the production servers the default browser authentication window pops up and I have to Authenticate two times! Whats up with that? I checked IIS and everything seems fine! ...

ActiveDirectory DirectorySearcher: Check if user is member of a group

Hi, I want to know if a given user is member of a group or not. Now, I don't know much about ActiveDirecory or Exchange servers, but in Outlook I can see that a user can be "memberOf" a group (and i can query those groups with DirectorySearcher.PropertiesToLoad.Add("memberof");), but there are also other groups that users are not active...

listing all members of an active directory group

hi, I'm having trouble retrieving the members of a certain group in active directory. The code im usinf is the following [Microsoft.SqlServer.Server.SqlFunction(FillRowMethodName = "fillRow")] public static IEnumerable getNTGroupMembers(string groupName) { SearchResult result; DirectorySearcher search = new Directory...

How do I get DirectorySearcher to honor my specified SearchScope?

I have the following C# code in a project: DirectoryEntry root = new DirectoryEntry(@"LDAP://ad.mydomain.com"); DirectorySearcher ds = new DirectorySearcher(root); ds.DerefAlias = DereferenceAlias.Always; ds.SearchScope = SearchScope.Subtree; ds.Filter = "(|(name=John_Smith)(cn=John_Smith))"; SearchResultCollecti...

.NET Active Directory Password Expiration on Windows 2008

Searched SO and Everywhere else, including the .net developers guide to directory services programming book - no luck. I am trying to create a simple password reset web page that allows the user to change their password. The change password portion of the code is working fine. For the users I would also like to display when their curr...

Logon script for a mixed operating system environment

Hi Friends, I have a Active Directory controller on a Windows 2003 server. My users use Windows, Linux, Mac OS, Novell Operating system on client machines. I need to create a login script which is interoperable on all the client operating systems. Any ideas would be greatly appreciated on how to accomplish this. I was searching for a ...

Examples using Active Directory/LDAP groups for permissions \ roles in Rails App.

Hello. I was wondering how other people implemented this scenario. I have an internal rails app ( inventory management, label printing, shipping,etc). I'm rewriting security on the system, cause the old way got to cumbersome to maintain ( users table, passwords, roles) - I used restful_authentication and roles. It was implemented about ...

How to make an IDisposable object a class variable?

I am working with Active Directory using C#. Instantiating the PrincipalContext object seems to be expensive, so I'd like to store one in a class variable. When using PrincipalContext as a local variable, I can use the convenient using syntax. When storing an IDisposable object in a static variable, how do I ensure the object is properl...

Local active directory access and management for development?

Hi everybody, In an application we are developpment, we are accessing Active Directory users and groups using the .Net DirectoryEntry and DirectorySearcher classes. Managing the test groups and users during development is getting tedious. I am wondering if there was an easy way to setup a simple local AD in which we could easily create...

Active Directory as OpenID provider?

Can an Active Directory be used as a OpenID provider? WIF is an option, but it's quite complicated and not very widespread. ...

SetPassword is very slow

Hi We are experiencing a performance problem when communicating with the active directory using System.DirectoryServices. DirectoryEntry.Invoke("SetPassword", new object[] { password }) sometimes takes 15 seconds. The Service that makes the call is running on the same machine. What could make it that slow? Cheers, bja ...