I have a windows forms project that uses PrincipalContext.ValidateCredentials Method
Everything works fine, but...
First, a user logs in to windows environment by using his/her windows username and password. Then, this user logs in to my app by using his/her windows username and password. This is a duplicate work isn't ?
My goal is to create something like SSMS's windows authentication (if you connect to DB selecting windows authentication it doesn't ask for your windows password because you are already logged in). So I want to get currently logged-in user's username and something like (Hash, GUID, SID etc.) and use that info to authenticate user.
Is there any way to achieve this ?