0

In UWP Credential manager is a good place to store sensitive information between application uninstallations and installations. I see that the Credential Manager by default enable roaming between devices and can't be turned off programmatically. My questions are

  1. 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?

  2. PasswordVault sync, if you're using your Microsoft email. What about other types of logins such as AD or AzureAd? Does this credential syning apply to any login types or just Microsoft email login?

Thanks.

SurenSaluka
  • 1,534
  • 3
  • 18
  • 36

1 Answers1

1

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?

I have to say that the Credential locker is not designed for such a scenario. If you want to save the user information locally, you could choose other ways like a local database. As you've already known, the Credential locker will roam data and we can't disable this. So the data will share between devices as long as you are logged as Microsoft accounts.

PasswordVault sync, if you're using your Microsoft email. What about other types of logins such as AD or AzureAd? Does this credential syning apply to any login types or just Microsoft email login?

There is no description of this on the Credential locker document. But the Microsoft account should point to the account that you used to log in to the system. So I suspect the AzureAD account doesn't work. My suggestion is that you could directly make a test with your AzureAD account.

Roy Li - MSFT
  • 8,043
  • 1
  • 7
  • 13
  • Hi, even if I have a local db it won’t stay dying app uninstall. I want the data to be exist between installations. – SurenSaluka Mar 04 '22 at 02:41
  • 1
    @SurenSaluka You could try [PublisherCacheFolder](https://learn.microsoft.com/en-us/uwp/api/windows.storage.applicationdata.getpublishercachefolder?view=winrt-22000). The data in PublisherCacheFolder will only be cleaned up when the last app from the publisher is uninstalled. – Roy Li - MSFT Mar 04 '22 at 02:51
  • 1
    @SurenSaluka If you only have one app installed on the user's device, you could consider saving the data into the local disks of the device. – Roy Li - MSFT Mar 04 '22 at 03:12
  • That require user’s permission. If the user denies access to the local storage another problem. :( – SurenSaluka Mar 04 '22 at 03:20
  • 1
    @SurenSaluka You could choose the Document library as the target place. – Roy Li - MSFT Mar 04 '22 at 05:48
  • Li Thanks. But this won't sustain between application reinstalls. Also, I might need to get the user's permission for this. – SurenSaluka Mar 15 '22 at 06:48
  • 1
    @SurenSaluka UWP app could access the Document, Pictures, Video, Music libraries, as long as you added the capability in the manifest file. It does not require user permission. – Roy Li - MSFT Mar 16 '22 at 01:56
  • Thanks for the info. Still I can’t add such capabilities to the app without a business requirement. – SurenSaluka Mar 16 '22 at 03:02
  • 1
    Well. I have to say there are no other ways. Maybe you could consider saving it online. – Roy Li - MSFT Mar 17 '22 at 06:23
  • Thank you for the support. Appreciate it. – SurenSaluka Mar 17 '22 at 06:29