I just discovered that Win8 has a section on the Control Panel called User Accounts and Family Safely with Credential Manager. I'd like to access the credentials stored in there (not to retrieve the passwords but to use them as tokens for a login). So, basically, I'd like to get a piggy-back ride on already installed software.
The closest to a solution has been suggested in this discussion and it's not that close.
Where do I find the assembly for Windows.Security.Credentials.PasswordVault? I've been googling for two hours but I only get information on app development while I'll be targeting desktop.
Is there a way to resolve access to the pre-stored credentials for both Win7 and Win8? I fear a little bit that the vault facility has been drastically remodeled in Win8, making it impossible to target both platforms at once.
How to: Add or Remove References By Using the Reference Manager says:
I came across the same issue and found out that there is no simple answer anywhere.
This is what I found:
TargetPlatformVersion
as mentioned above.C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral\Annotated\Windows.winmd
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll
You can use wrapped Credential Management package. It's an open-source project. I checked it in Windows 7 and it works right.
In order to save your data use following code:
And to load your data use: