Micro Focus Expert
Micro Focus Expert

<(UFT) Support tip> API request with Basic Authentication returns status code 401 (Unauthorized)

Hi there,

If you are getting this "Unauthorized" response message and you're completely sure you set the correct username and password, then you may want to check this out.

First of all, where do we configure the user and password information for Basic Authentication on UFT? Well, when working with HTTP request activities, go to Properties pane> General tab:

If you're working with a SOAP request activity, then you need to go to Properties pane> Security tab:

On both scenarios, we have the option "Use preemptive authentication".  If we enable this option, UFT will send authentication information without waiting for an authentication challenge. Again, this is for scenarios where we are sure that the credentials we are using are correct but still are not working or when you're already aware that your Web Service/Server won't send an authentication challenge.

Hope you find this support tip helpful!
HPE Support

Labels (1)
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.