Search code examples
c#windows-store-appscredentialsroamingpasswordvault

Can I prevent roaming of PasswordCredential stored in PasswordVault?


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?


Solution

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