473,383 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to retrieve all user info like (Name, Department, etc ) using active directory

I have an asp page and i want to know the employee info with out using log in page.

I am using the following code to retrieve the current user:

Expand|Select|Wrap|Line Numbers
  1. Dim currentADUser As System.DirectoryServices.AccountManagement.UserPrincipal
  2. currentADUser = System.DirectoryServices.AccountManagement.UserPrincipal.Current 

I am only able to to retrieve the name only.
I want retrieve other info like department.
Mar 9 '11 #1
2 3381
Frinavale
9,735 Expert Mod 8TB
The UserPrincipal Class has a number of properties that will return you information about the user. I don't know where you stored "Department" information...perhaps in the Description?

-Frinny
Mar 9 '11 #2
Thank you for you reply , i will try it .
Mar 13 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: elziko | last post by:
Hi, I'm using the following code to create a user: Dim strNodeName As String = "test user" Dim NewUser As DirectoryEntry Dim AD As New DirectoryEntry("WinNT://MYCOMPUTER") 'delete user...
2
by: Greg Buckley | last post by:
I have come across an interesting problem. Let me first state that I am not a fluent ASP programmer. I am a network engineering trying to port an existing app. The app in question is currently...
0
by: Federica | last post by:
Hi! I need some help retrieving user information in Active Directory. I have one webform with 2 textboxes 1 username and one for password. When the user load this page and insert his username and...
0
by: Egbert | last post by:
Hi. I am using forms authentication in ASP.Net against Active Directory. I have followed the example provided by Microsoft. Here is my problem. Standard practise for AD Administrators is to...
0
by: J'son | last post by:
Guys, I need to build a web intranet application that can automatically create a user account when a new user registers on the site. The user account will be on the web server, member of the...
4
by: pjdouillard | last post by:
Hello all, Here is the context of my problem: We have an ASP.NET 1.1 application that has its own application pool setup and that runs under the identity of a NT Domain service account (this...
2
by: Derek Martin | last post by:
Hey everyone. I am designing a new application that has a need for several different permission sets, ie., which functions of the app are turned on based on who you are. I would like to reference...
1
by: Finn Stampe Mikkelsen | last post by:
Hi I'm coding a project, that needs to authenticate the user on a remote servers active diretctory... The program should be able to lookup the user in the servers AD, authenticate the user og...
8
by: Raven7738 | last post by:
Hey, So I originally had a form asking for an ID and password. A query would take those two values and pull up information in a database that contained both those values. I need to change this so...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.