Value of type 'String' cannot be converted to 'System.Security.SecureString'

We are attempting to use UiPath.ActivDirectoryDomainServices.Activities to retrieve user account properties but are having trouble converting the password string to a secure string to authenticate with the server.

The error we are getting on each attempt is:

Following several forum posts we have attempted the following:

  1. We tried plain string text
  2. We tried adding a secure string variable and assigning the text
  3. We used the vb expression shown in the attached screenshot

All resulted in the error shown Value of type ‘String’ cannot be converted to ‘System.Security.SecureString’

I am new to UiPath so for the newbie please give as much detailed information as you can such as how to use the variable and the secure string etc.

Hi @kevin.babbit

Don’t need to give . password in the last


remove the “adPassword=” from the password field.