gweedo
gweedo

Reputation: 1

Get the type of logon for a user

Hi I am working on a project and need to get the type of logon for each user on the domain. By type I mean if the user connected to our domain via their phone to check e-mail, or if they are on a laptop and connected through a VPN, or just the plain desktop authentication.

I need this because we have a policy here that a person who has not logged on in over 10 days must be disabled. I am not seeing anything obvious on the MSDN site, nor anything relevant in any posts.

any help would be greatly appreciated. I am looking to do this in C#, as I already have a few other class libraries in C# doing some other AD functions and want to just add this into that solution.

thanks.

Upvotes: 0

Views: 96

Answers (2)

James Pusateri
James Pusateri

Reputation: 166

Assuming you've already got the logon, browser could give you device information.

I would think that a browser check might be the way to go. Any interaction on the part of your users could then be used to directly confirm which machine they are using, be it iPhone, Android, WindowPhone, or standard computer. You'd have to code that with a little JS but it would allow you to very simply add that to any logs.

Simple way can be found here http://www.w3schools.com/js/js_window_navigator.asp but a perhaps better way would be with object detection, which would find browser by directly testing for certain features.

Upvotes: 0

deloreyk
deloreyk

Reputation: 1239

I have found this CodeProject article that describes almost everything you can do with windows user, including getting domain information.

Howto: (Almost) Everything In Active Directory via C#

Upvotes: 1

Related Questions