Azure SQL Database is Microsoft's fully managed relational database service in the Azure cloud, built on the SQL Server database engine. The UnifyApps Microsoft Azure SQL Database connector connects directly to your database to insert, update, upsert and delete rows and run SQL statements from workflows and agents.
This guide covers every connection method available on the connection form, and the actions supported, along with the database permission each one needs.
Authentication
Before you begin, you should have the following information:
Connection name: a descriptive name such as MyAppAzureSQLIntegration, so the connection is easy to identify later.
Connection Type: select how UnifyApps reaches your database:
Directly
Via SSH
Both methods use the same database fields:
Server Name: the fully qualified server name, such as
yourserver.database.windows.net.Port Number: the port the database listens on. It defaults to
1433.User and Password: a SQL authentication user that has the permissions listed in the table below.
Database Name: the name of your Azure SQL database.
Schema Name: the schema that holds the tables the actions use, for example
dbo.SSL Secure: on by default, so the connection is encrypted. When it is on, you can also paste a Client certificate and SSL certificate key (both in .pem format) and a Server certificate, and set Trust all (on by default; it accepts any certificate chain, including self-signed server certificates) and Verify host (matches the name in the server certificate against the host).
Before you connect: prepare the database in Azure
In the Azure portal, go to SQL databases and select your database. On the Overview page, copy the server name (for example
yourserver.database.windows.net) and note the database name.Open the server, go to Security → Networking and, under Public network access, choose Selected networks. Click Add a firewall rule, enter the IP address range UnifyApps connects from (ask UnifyApps support if you do not have it) or, for Via SSH, the SSH server's address, and click Save.
Connect to the database as the server admin (for example with the Query editor in the Azure portal) and create a contained database user for UnifyApps:
CREATE USER unifyapps WITH PASSWORD = '<password>';Grant only what the connection needs, for example
GRANT SELECT, INSERT, UPDATE, DELETE ON SCHEMA :: dbo TO unifyapps;, or add the user todb_datareaderanddb_datawriterwithALTER ROLE db_datareader ADD MEMBER unifyapps;andALTER ROLE db_datawriter ADD MEMBER unifyapps;.
Note: the connection signs in with SQL authentication, so it cannot connect if Microsoft Entra-only authentication is turned on for the server. A contained database user signs in to one database only, so the Database Name on the connection form must be the database where you created the user.
1. Directly
Use this when UnifyApps can reach the Azure SQL server through its public endpoint and the server firewall allows it.
Open Connections → New Connection → Microsoft Azure SQL Database and enter a Connection name.
Enter the Server Name, Port Number, User, Password, Database Name and Schema Name.
Select Directly as the Connection Type.
Keep SSL Secure on, and add certificates if your setup requires them.
Click Test Connection to validate the details, then click Create.
2. Via SSH
Use this when the database must be reached through an SSH server (bastion host) in your network instead of directly. UnifyApps opens an SSH tunnel to that server and connects to the database through it.
Step 1: Prepare the SSH server
Choose an SSH server that can reach the Azure SQL server on its port, and allow that server's address in the Azure SQL server firewall.
Create or pick a user on the SSH server, and add the public key of an RSA key pair to that user's authorized keys. Keep the private key for the connection form.
Make sure the SSH server accepts connections from UnifyApps on its SSH port.
Step 2: Connection setup in UnifyApps
Open Connections → New Connection → Microsoft Azure SQL Database and enter a Connection name.
Enter the Server Name, Port Number, User, Password, Database Name and Schema Name.
Select Via SSH as the Connection Type.
Enter the SSH Host, SSH port and SSH user (all required), and paste the RSA Private Key.
Click Test Connection to validate the details, then click Create.
Actions
Permissions are the database permissions the connection's User needs on the table. Membership in db_datareader covers SELECT, and db_datawriter covers INSERT, UPDATE and DELETE on all user tables.
Actions | Description | Permissions Required |
|---|---|---|
| Deletes rows from a table in Microsoft Azure SQL Database. | DELETE and SELECT on the table |
| Executes a SQL statement in Microsoft Azure SQL Database. | Depends on the statement, for example SELECT, INSERT, UPDATE or DELETE on the tables it uses |
| Inserts a row into a table in Microsoft Azure SQL Database. | INSERT on the table |
| Updates a row in a table in Microsoft Azure SQL Database. | UPDATE and SELECT on the table |
| Inserts a row, or updates it if it already exists, in a table in Microsoft Azure SQL Database. | SELECT, INSERT and UPDATE on the table |