Knowledge Base

How to work with Windows Credentials

In Windows, you can view and manage your network-based logon credentials (i.e., usernames and passwords) using Credential Manager.

With UiPath, you can automate the process of creating, querying and deleting the credentials through some dedicated activities.

The atached workflow shows a basic example of how to create a credential, get its details and delete it. Below is a short description of the workflow logic and the activities used.

Workflow steps


1. Using the Add Credential activity, we'll add a new Generic type credential - (we called it "CredentialTest"). Then we will set its Username and Password.

If we pause the workflow at this point and take a look into the Windows Credential manager, we'll see the credential we have just created.

2. Back to our workflow. We'll now get the credential's details - using Get Credential activity. We'll save the Username and Password in 2 diferent String variables (user and pass). 

We'll save the Result (which is Boolean type) in a variable (IsValidCredential) so we can use it later to check if the credential is valid or not.

3. If the credential is valid (IsValidCredential=True), we'll show its details in a Message box. Otherwise - an error message ("Credential not found!") will pop up.
4. Finally, we delete the credential we added in the first step - using the Delete Credential activity

Note: The workflow is created with UiPath Studio 8.