Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a way to list all currently logged in users in Active Directory (ADAM) using C#?

share|improve this question
1  
Logged into what? –  Jim B Jun 3 '11 at 13:12
add comment

2 Answers

up vote 1 down vote accepted

Almost certainly not. Active Directory does not maintain a logon-state record.

Based on your other question, you may be able to compare logon/logoff times and guess at the active logged on user. But even this will be just a guess. You might consider something such as a query of the client computer directly using WMI for the logged on user. Users can end an active logon session without a log off event -- think program termination, standby, reset, forced power cycle.

share|improve this answer
1  
I tried researching how to do this before (in other languages)...getting an accurate record for something like this is surprisingly difficult with Windows. –  Bart Silverstrim Jun 3 '11 at 12:39
add comment

ADAM is an authenticaion provider, so the only auditing capabilities are around who has been querying ADAM. Think of it like an ID badge. You don't query the badge to see what doors it's opened, you query the doors to see what badges opened them.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.