Azure Synapse
BInbox signs in to Azure Synapse with a Microsoft Entra access token, over TLS 1.2 or higher with the server’s
certificate checked. SQL logins are not offered. The server’s name must end in .sql.azuresynapse.net or
.database.windows.net.
BInbox’s T-SQL for Synapse has been proven on a SQL Server but not yet on a Synapse pool itself, so the first connection to a Synapse workspace is also a check of it. If the report passes but a query is refused, tell BInbox which query.
What you will paste into BInbox
Section titled “What you will paste into BInbox”On New connection, choose Azure Synapse.
| Field | What to enter |
|---|---|
| Server | The SQL endpoint’s name, such as myworkspace.sql.azuresynapse.net. In the Synapse workspace, it is under Properties as the dedicated or serverless SQL endpoint. |
| Database | The SQL pool or serverless database to read. |
| Port | 1433 unless the service says otherwise. You may leave it empty. |
| How BInbox signs in | A service account’s user name and password or key file (the app registration’s client secret) or BInbox’s own identity, trusted by the warehouse (no secret kept). |
| Directory (tenant) id | From the app registration. |
| Application (client) id | From the app registration. |
| Client secret | From the app registration. Service account only. |
Step 1: make the app registration
Section titled “Step 1: make the app registration”Follow Set up a Microsoft Entra app registration and keep its three values and the app’s display name.
Step 2: let the app read the database
Section titled “Step 2: let the app read the database”Connect to the pool as the workspace’s Microsoft Entra administrator, and create a user for the app:
sqlcmd -S myworkspace.sql.azuresynapse.net -d <database> -G -Q "CREATE USER [BInbox reader] FROM EXTERNAL PROVIDER; EXEC sp_addrolemember 'db_datareader', 'BInbox reader';"The same statements run in Synapse Studio’s SQL script editor, connected to the pool. The name is the app
registration’s display name. To read only some schemas, grant SELECT on those schemas instead of adding
db_datareader:
CREATE USER [BInbox reader] FROM EXTERNAL PROVIDER;GRANT SELECT ON SCHEMA::<schema> TO [BInbox reader];On a serverless pool, a query over files in storage also needs the app to read those files. Give the app Storage Blob Data Reader on the storage account’s container, as in Azure Blob Storage.
Step 3: let BInbox reach the workspace
Section titled “Step 3: let BInbox reach the workspace”In the portal, open the workspace, Networking, and check that public network access is on and that the firewall admits the connection. BInbox does not connect from a fixed address yet, so a firewall that admits only listed addresses blocks it.
Least permissions
Section titled “Least permissions”| Grant | Why BInbox needs it |
|---|---|
A database user for the app, from EXTERNAL PROVIDER |
To sign in to the pool. |
db_datareader, or SELECT on the schemas to read |
To list and read the tables. |
Do not add the app to db_datawriter, db_owner or any server role.
Check: the test-connection report
Section titled “Check: the test-connection report”Choose Test connection in BInbox. The first four permissions must be Granted, and the last is optional:
| Permission | Granted when |
|---|---|
| Sign in | Entra gives a token and the pool accepts it over TLS. |
| List the schemas | The app may see at least one schema besides sys, INFORMATION_SCHEMA and guest. |
| Read at least one table | The app has SELECT on at least one table or view. |
| Run a query | A SELECT 1 runs. |
| Refuse a write, so SQL an author writes can run (optional) | BInbox first reads whether the app is in db_owner, db_datawriter or db_ddladmin, and whether it may delete from the first table it may read. If it may, the report says it could write, and no delete is sent. Otherwise the warehouse refuses a delete of no rows from the first table, DELETE FROM <table> WHERE 1 = 0, with error 229 (permission denied), inside a transaction that is rolled back. An app in db_datareader only is refused. The test shows that one table refused, so the role is the control. Without this, authors still pick tables, but cannot write a dataset’s SQL. |
Add it in BInbox
Section titled “Add it in BInbox”An owner or admin opens the Data tab at app.binbox.ai, chooses Connect, then New connection, fills in the fields above, and chooses Test and save. Connections describes the screen.
Then an author sets up a dataset from one of the connection’s tables or views, as Pick a table describes.