Using the Windows Credential Manager from MsBuild

Today I needed to make a web service call with authentication from MsBuild. Of course storing the credentials in plain text is not an option.

The Windows Credential Manager User Interface can be opened by running the command:

control /name Microsoft.CredentialManager

There is also a command line interface:


As the Windows APIs are not provided as wrapper through the BCL a NuGet package comes to help:

nuget.exe install CredentialManagement

Finally everything wrapped up in a MsBuild Task:

Add comment