Getting 401 error status while connecting to Microsoft SQL Server hosted on Azure using Flogo connector for Microsoft SQL Server

Getting 401 error status while connecting to Microsoft SQL Server hosted on Azure using Flogo connector for Microsoft SQL Server

book

Article ID: KB0076217

calendar_today

Updated On:

Products Versions
TIBCO Flogo Connector for Microsoft SQL Server 2.x

Description

While configuring connection of Flogo connector for Microsoft SQL Server with  SQL Server Hosted on Azure, the following error is reported
=====================================
"Error Occurred: Response with status: 401 OK 
for URL: https://integration.cloud.tibco.com/wistudio/v1/contributions/proxy/dbservicego/api/v2/dbtest"
=====================================

Issue/Introduction

Follow the configuration steps

Environment

-------------------------------------- Environment: TIBCO Cloud Integration (TCI) Product: TIBCO Flogo Connector for Microsoft SQL Server Version: 2.x --------------------------------------

Resolution


To resolve this error, needs to be white list the IP addresses of TCI in SQL Server Hosted on Azure.

List of IP addresses which needs to be white list:

======================================
The IP addresses for AWS in the US region are:

35.160.22.232
52.35.217.68
54.148.158.186
The IP addresses for AWS in the EU region are:

52.18.33.150
52.211.120.80
52.213.242.236
The IP addresses for AWS in the AU region are:

54.79.49.140
52.63.136.111
13.54.75.2
The IP addresses for Azure are:

40.91.78.2
52.149.56.186
======================================  

For more details please go through:
https://integration.cloud.tibco.com/docs/getstarted/reference/whitelisting.html


How to white list IP address on SQL Server Hosted on Azure?

1. Login to Azure portal.
2. Select the database which need to access from TCI.
3. From the database overview page:
To set a server-level IP firewall rule from the database overview page, select "Set server firewall" on the toolbar, as the following image shows.

User-added image

4.The Firewall settings page for the SQL Database server opens.
Then add Rule name, Start IP and End IP, for all IP in region:
--------------------------------------------------
Ex: Rule Name |    Start IP    |       End IP
     TCI_IP1  | 135.160.22.232 |   35.160.22.232
     TCI_IP2  | 52.35.217.68   |   52.35.217.68
     TCI_IP3  | 54.148.158.186 |   54.148.158.186
--------------------------------------------------
User-added image

5.Select Save. A server-level IP firewall rule is created for TCI IP address.

For more details please refer the following document -
https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure


Now, Configure Flogo SQL server connection as:
=============
host: "<AzureServerName>.database.windows.net"
port: 1433
databaseName: "<DatabaseName>"
user: "myusername@"<AzureServerName>.database.windows.net"
password: "mypassword"
==============
On Azure JDBC connection string given as:
================
jdbc:sqlserver://<azureservername>.database.windows.net:1433;database=<databasename>;user={myusername}@<azureservername>;password={mypassword};encrypt=true;trustservercertificate=false;hostnameincertificate=*.database.windows.net;logintimeout=30;
================