How to save credentials to the 'Windows Credentials'-vault RRS feed

  • Question

  • Hi everyone.

    We are developing Winddows store app which uses RemoteDesktopClient object.

    Work scenario:
    1. User is authenticated on our server.
    2. Server send response which contains address of terminal server.
    3. We try to establish rdp connection. And user have to login again.

    Problem is double login.

    We found out that RemoteDesktopClientSettings has undocumented property "Prompt for credentials on client". If RemoteDesktopClientSettings.setRdpProperty("Prompt for credentials on client", true) then user will be prompted to save his/her credentials. The credentials will be used for the further connectons. The credentials are saved to "Windows credentials" vault (control panel -> user accounts -> credential manager).

    We try to use Windows.Security.Credentials.PasswordVault but credentials are stored to "Web credentials". Also we found Windows.Security.Credentials.UI.CredentialPicker sample. In documenatation [http://msdn.microsoft.com/en-us/library/windows/apps/windows.security.credentials.ui.credentialpickerresults.credentialsaved.aspx] is said that CredentialPicker can save credential by credential manager. We ran sample and tried diffrent options but credentials never have been saved. Is it bug?

    We would like to know how to save credentials to "Windows credentials" vault. Is it possible for Metro app? (On desktop we can use function CredWrite).
    Also we found undocumented property "EncryptedPassword" but we don't know format of data. Does anyone know the format?

    Thursday, January 31, 2013 9:15 AM


All replies

  • Hello elShepO,

    If I understand correctly, the whole purpose for you is to automatically have the user login, without having to re-enter the username & password in the remote desktop session? In other words, you are looking for functionality that will let you set the username as well as password using the setRdpProperty and then automatically login?

    Can you please clarify?



    Friday, February 1, 2013 1:38 AM
  • Yes, that's right.
    Friday, February 1, 2013 7:40 AM
  • Hi elShepO,

    Thanks for the confirmation. At this point of time, the only available supported properties that you can set through code - setRdpProperty are documented on MSDN: http://msdn.microsoft.com/en-us/library/windows/apps/Hh994953.aspx.

    The problem of not being able to set the password programmatically is a known issue.  We’ll follow up with you on this thread when it’s fixed.

    Until then, there is no option to set the password programmatically.



    Saturday, February 2, 2013 5:18 AM