active-directory

How can I search for a user based on a Certificate in LDAP?

How do I search for a specific user object in LDAP that has an associated x509 certificate? Do I need to encode it in a certain way? It looks like the attribute is userCertificate based on looking at JXplorer. Note: Accessing Active Directory through LDAP ...

Active Directory in VB.Net

How can I get a list of computers and their properties from Active Directory using VB.Net and Visual Studio 2008? ...

Roles.GetRolesForUser() results are cached

When I run Roles.GetRolesForUser("username") the roles are returned correctly, however if I add a user into a role in AD, the result does not show up until I log the user out of their system, and have them log back in. Is there any way to make the system re-check each time? ...

Problem getting Users from ActiveDirectory [C# in ASP.NET]

Cannot get the user list from ACtiveDirectory Services when accessed from another system in the same network. If accessed from where the code is, then we can obtain the userlist, but cannot get it when accessed from other system in the same network. Any help is utmost appreciated... Thanks, Venkat. ...

SQL Server GUID (from Active Directory) vs Int

We migrated a lot of data from our old ordering system. This system stored the users initials in our "Orders" table for each order they created. Now that we have a view that looks at active directory I would like to update those initials with the active directory objectguid (or something that references the guid). This would allow us to ...

Guidelines to follow when making your program Active Directory/Terminal Services compatible

Wondering if there's any guidelines that should be followed when writing an application that should work not only on a plain ol' non-networked computer but also on a computer/network that is setup with Active Directory (or some other directory service) and/or Terminal Services? Anything I should look out for, be aware of, etc? ...

Active Directory and PrincipalPermission

This is more of a curiosity than a request for help, but I noticed that when using PrincipalPermission and verifying a user is part of a specific group in Active Directory it will not use the true group name but instead validates against the pre-Windows 2000 group name instead. Ordinarily this wouldn't make a difference - unless someone ...

Active Directory Display all properties in a table

I am trying to achieve an LDAP query to gather all properties we have about our users without specifying the properties before hand, I would like to display this in a table so used the below code. This works if I uncomment the search.PropertiesToLoad.Add("cn"); line and will display any other properties I add in the same way but not when...

Manage active directory groups specific to an application within an application

Is it a good or bad practice to manage active directory groups specific to an application within an application? My development team has written a Sharepoint application that has groups and teams (these are terms unique to the application and is not related to AD groups or Sharepoint groups). Once users are added to these groups and te...

How to improve asp.net AJAX autocomplete performance

My web site has city,state and zip code autocomplete feature. If user types in 3 characters of a city in the textbox, then top 20 cities starting with those characters are shown. As of now, Autocomplete method in our application queries sql 2005 database which has got around 900,000 records related to city,state and zip. But the respo...

Entering active directory values in W2k3

Hi, how can I go about entering active directory values in my W2K3 operating system, so that I can use vbscript to retrieve those values? Thanks ...

How to change System.DirectoryEntry "uSNChanged" attribute value to an Int64

I'm trying to get the Int64 value of a Directory Services object's "uSNChanged" value. Unfortunately, it is always coming back as a COM object of some kind. I've tried using casting to Int64, calling Int64.Parse(), and calling Convert.ToInt64(). None of these work. For a given DirectoryEntry object, this code will display the properties...

LDAP: using a filter to avoid a sub OU in Active Directory

I have an application that pulls user information from an OU in Active Directory. The parameters it takes are a base for the search and a filter string. I have an OU I want to pull information from, but there is a sub OU I want to avoid: Wanted: users from OU=People,DC=mydomain,DC=com Not Wanted: users from OU=Evil,OU=People,DC=my...

Get UPN or email for logged in user in a .NET web application

I'm not a .NET developer, and I have a feeling this would be trivial for someone who is: I have a C# web application that makes user of the user credentials of the logged in user. Currently it uses the SID which comes from System.Security.Principal.WindowsIdentity.GetCurrent().User.Value I need to get either the users UPN login or e...

How do I create a new user in AD from SharePoint.

I am looking to have a SharePoint Extranet Portal setup for my "partner" clients. I want to make a site admin for each extranet site for each client. This admin would be able to add new users to the portal AND have that user be created in AD (Active Directory). Has anyone done this or know of a good tool that would provide me that abili...

C++ api to develop over Active Directory

I need to access the Active Directory data programmatically using a native C++ API because I like C++ and I think it is faster than any .NET programming language. I could not find a C++ API developed by Microsoft, it only has a C one (ADSI) and it is really an awful API. I found a C++ API in open LDAP but it has some errors and it seems ...

Can I retrieve the domain name and user name by searching Active Directoy using C#

All, I have a big list of user emails, and I need to get the username and domain name for each one of them. My organization contains lots of domains and our users log on to their machine using usernames that are different from their email addresses. Please advise if we can write a C# utility that can search AD using the email of each ...

Does authorization in web.config check sub-groups as well?

If I put something like this in my ASP.NET web application's web.config: <authorization> <allow roles="MyUsers" /> <deny users="*" /> </authorization> and then have an ActiveDirectory group SpecialGroup that is inside MyUsers, will a member of SpecialGroup be allowed to access my application? ...

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 DEPARTMENT\Username but the actual path of the domain SITE might be site.company.com or DEPARTMENT might be dep.company.com etc I'm trying to find a way of turning DEPARTMENT into DC=dep,DC=c...

How can I formulate an ldap query looking for the absence of an attribute

I want to query my directory for all User objects that don't contain a value for a given attribute... I have kind of hacked it up looking for things without a specific value (the potential assigned values are small, so this mostly worked) - but I would really like to know if there is a way to actually query for the absence of an attribut...