I have an app that users would run locally on their desktop, which calls into an API on my server externally.
I can obtain the user's Windows domain and name through the WindowsIdentity
API. But I'd like to store a unique identifier/token on our side which I can compare subsequent logins with to ensure it's the same domain user and not an impersonator.
I cannot ask the user for credentials, as the login process is for beginner users and they need to be automatically logged in when opening the app. I'm looking through the WindowsIdentity
API looking for some unique ID, but not sure how it would last through password changes on the user's domain.
Edit: Perhaps a claim off the WindowsIdentity.GetCurrent.Claims
collection might contain something useful.