We are using CredentialManagement v1.0.2 Nuget package within WPF app to fetch the user credentials from Credential Manager. Below is the code :
private static Credential GetCredentials(Credential cacheCredentials) { if (!cacheCredentials.Exists()) { return null; } return cacheCredentials; }
And we are calling above method as :
var cred = GetCredentials(new Credential { Target = "CacheUser" });
Now this GetCredentials method is always returning null even though CacheUser is present in Credential Manager inside Control Panel.
Any pointers on above issue would be really helpful. Thanks.