How to avoid getting 401 unauthorized error while using REST Invoke API activity connecting to an NTLM authenticated server.

How to avoid getting 401 unauthorized error while using REST Invoke API activity connecting to an NTLM authenticated server.

book

Article ID: KB0070971

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for REST and JSON 2.1.0

Description

The REST & JSON plugin supports only 3 types of authentications -  Basic Authentication, Oauth 1.0, and Oauth 2.0 along with No authentication. The plugin does not support NTLM authentication officially. Though the BW Send HTTP Request activity as BW HTTP palettes support NTLM. If the server is NTLM authenticated and the request has been made using the Invoke REST API activity, the output will have a 401 unauthorized error.
 

Issue/Introduction

How to avoid getting 401 unauthorized error while using REST Invoke API activity connecting to an NTLM authenticated server.

Environment

All supported

Resolution

It is always recommended to test the NTLM configuration via the Postman first. Since the REST JSON plugin does not support NTLM, the request can be bypassed by allowing all hosts to use the NTLM.

For that, go to the net.properties file under the "tibcojre64/11/conf" folder for BW 5.15.0
and location "tibcojre64/1.8.0/lib" for lower BW versions.

Open the net.properties file using administrator privileges and make the below changes-
  • comment the property - jdk.http.ntlm.transparentAuth=disabled
  • uncomment the property - jdk.http.ntlm.transparentAuth=allHosts
Save the file and restart the designer/application to test the code again.
 

Attachments

How to avoid getting 401 unauthorized error while using REST Invoke API activity connecting to an NTLM authenticated server. get_app