Link to home
Start Free TrialLog in
Avatar of INSERTO
INSERTO

asked on

How to check if Current User logged on with Smartcard

How can i check (from Code) if the currenlty logged on user used a Smartcard to Logon?
Some C#/Vb.net code example would be nice, but c/c++ code is ok to.

If the User logged on via Smartcard the Function should return true, if he logged on with username and passwort only it sould return false.

Any help is appreciated
ASKER CERTIFIED SOLUTION
Avatar of Paranormastic
Paranormastic
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of INSERTO
INSERTO

ASKER

thanks for your hint
i'll check if the SMARTCARD environment variable is set in our environment
Avatar of INSERTO

ASKER

Because the Customer uses Windows 7 the SMARTCARD environment variable ist unfortunately not available.
Any other ideas?
Avatar of INSERTO

ASKER

we got it working by reading the server eventlog from the client.
but now we also need a solution for clients running "offline" e.g. running from home not reaching the domain controller.
are there local event log entries which could be used to evaluate if a smartcard was used for logon?