Can I prevent roaming of PasswordCredential stored in PasswordVault?

439 Views Asked by At

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?

1

There are 1 best solutions below

3
Thomas Levesque On BEST ANSWER

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