4

In my application, I'd like to store the user credentials using the PasswordVault class, since it's the recommended way to do it. However, I realized that the credentials stored with this method are synchronized with the user's Microsoft account, which I don't want.

I know the user can globally disable the synchronization of passwords in Windows settings, but it's not good enough; I don't want to roam the credentials for this app, regardless of the global setting.

Is there a way to programmatically prevent roaming of a specific PasswordCredential?

Thomas Levesque
  • 286,951
  • 70
  • 623
  • 758

1 Answers1

3

Apparently it's not possible, so I will store the password in the local settings, using DPAPI to protect it.

Thomas Levesque
  • 286,951
  • 70
  • 623
  • 758
  • Hi, what if I want the password to be preserved locally even if the app is uninstalled? I have a requirement to keep some data between uninstalls and installs of the app and at the same time without roaming between devices. – SurenSaluka Mar 01 '22 at 12:29
  • Another question, PasswordVault sync if you're using your Microsoft email. What about other types of logins such as AD or AzureAd? Does this apply to any login or just Microsoft email login? Thanks. – SurenSaluka Mar 02 '22 at 10:09
  • 1
    @SurenSaluka sorry, no idea. I haven't done any UWP development in years. – Thomas Levesque Mar 02 '22 at 13:10