How to use SSL certificate with "Web Service Client" action in ScenarioBuilder?

When trying to use the "Web Service Client" action in ScenarioBuilder, you might get an error if you don't provide the SSL cert. This article shows you how to use the SSL certificate with sending the request to the API using the action.

SB_ERROR

Error text from the log file: "error = Error: WinHttpSendRequest: 12044: A certificate is required to complete client authentication. type = execution type error: the test did not succeed"

If you get the previous error when running a scenario that contains a "Web Service Client" action in ScenarioBuilder, then you need to follow the steps below to fix the problem:

1. Use a version of ScenarioBuilder that is equal to or greater than 8.3.9.0

2. Have the SSL certificate on the Machine's Personal Certificates Store. To do that follow the steps below:

  • Search windows for "mmc" and open the "Microsoft Management Console"
  • Choose: File > Add/Remove Snap In ..
  • From the left hand list choose "certificates" and click on Add button
  • Choose to add to "Computer Account" and click on Next, Finish, and OK buttons
  • Select from the left hand list and expand "Certificates (Local Computer)" > "Personal" > "Certificates"
  • If the certificate does not exist, try to copy it here, or Right click and select "All Tasks" > "Import" to import it by following the steps in the form

3. Get the certificate name, and write it as the value of the property "Client SSL Certificate"

4. Play the scenario in ScenarioBuilder, and make sure that the scenario succeeds this time

Screenshot_2-8

Screenshot_3-3

Screenshot_4-3

If you want to run the scenario using any of the other Automai tools (AppLoader, AppsWatch, RPA, or AppVerify), just make sure that the user account that will play the script has at least "read" permissions on the SSL certificates in the "Microsoft Management Console".

Here are the steps to add "read" permissions to a user account:

  1. Search windows for "mmc" and open the "Microsoft Management Console"
  2. Choose: File > Add/Remove Snap In ..
  3. From the left hand list choose "certificates" and click on Add button
  4. Choose to add to "Computer Account" and click on Next, Finish, and OK buttons
  5. Select from the left hand list and expand "Certificates (Local Computer)" > "Personal" > "Certificates"
  6. When you got the certificate in the Personal container, right-click on certificate and select All Tasks ->Manage Private Keys. You will see private key permission editor. Grant Read permissions to the user account you want