C# Credential Provider UpdateRemoteCredential not firing while connecting with RDP

249 Views Asked by At

I developed a custom credential provider by using C# and it works both unlock and logon scenario locally. When its CREDUI scenario, i can logon or unlock remote computer with my local Credential provider.

My filter is registered in regedit. Same DLL but different classes.

  1. What I cannot to do is, catch logon or unlock scenario on remote computer with my custom credential provider. I implemented filter interface. UpdateRemoteCredential not working. What could i missing? How can I say "use this credential provider while logging in" in server machine. Thanks.
1

There are 1 best solutions below

1
candogg On BEST ANSWER

Finally I did it and covered all scenarios both interactive and remote logon. Firstly, UpdateRemoteCredential is firing on target system (i didn't know that). Credential Filter must be installed correctly on target machine. After UpdateRemoteCredential fires, I needed to hold serialized credentials in SetSerialization method (ICredentialProvider implementation). After that, in ICredentialProviderCredential2 implementation, SetSelected method fires. In SetSelected method, I set pbAutoLogon to 1 (because i have credentials). After that, GetSerialization method is fired and its done.

Method order in RDP connections;

  • UpdateRemoteCredential (get serialized credentials)
  • SetSerialization (hold serialized credentials in implementation)
  • SetSelected (set auto logon property to 1)
  • GetSerialization (give serialized credentials to system)