Azure Database for PostgreSQL is a fully managed relational database service built on the PostgreSQL community edition. It handles provisioning, patching, backups, and scaling automatically, and is available in two deployment modes: Flexible Server and Single Server. Connecting Azure Database for PostgreSQL to Databox lets you pull data directly from your managed database, build datasets using SQL queries, and visualize business-critical figures alongside data from your other connected tools.
If you've already established a connection, you can reuse it to add new data sources to your Databox account.
Databox only reads data from your database — it never writes to it. Create a dedicated PostgreSQL role with SELECT-only privileges on the schemas and tables you want to expose. You can run these commands using the Query editor in the Azure portal, or via a PostgreSQL client connected to your instance.
CREATE ROLE databox WITH LOGIN PASSWORD 'your_secure_password';
GRANT CONNECT ON DATABASE your_database TO databox;
GRANT USAGE ON SCHEMA public TO databox;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO databox;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO databox;Replace your_database with the name of the database you want to connect, and your_secure_password with a strong password. If you need to expose tables in additional schemas, repeat the GRANT USAGE and GRANT SELECT statements for each schema.
Databox connects to Azure Database for PostgreSQL over a public endpoint. The steps differ depending on whether you are using Flexible Server or Single Server.
Flexible Server:
- In the Azure portal, go to your Azure Database for PostgreSQL Flexible Server resource.
- Under Settings, click Networking.
- Under Connectivity method, select Public access (allowed IP addresses).
- Click Save to apply the change.
Single Server:
- In the Azure portal, go to your Azure Database for PostgreSQL Single Server resource.
- Under Settings, click Connection security.
- Set Allow access to Azure services to No (unless required for other integrations).
- Confirm that Public access is enabled. If not, enable it and click Save.
Azure Database for PostgreSQL uses firewall rules to control inbound network access. Add a rule that permits connections from the Databox IP address.
Flexible Server:
- In the Azure portal, go to your Flexible Server resource.
- Under Settings, click Networking.
- Under Firewall rules, click Add current client IP address or click Add firewall rule to enter a custom range.
- Set the Start IP address and End IP address both to
52.4.198.118. - Give the rule a name (e.g.,
Databox) and click Save.
Single Server:
- In the Azure portal, go to your Single Server resource.
- Under Settings, click Connection security.
- Under Firewall rules, click Add client IP or enter values manually:
- Rule name:
Databox - Start IP:
52.4.198.118 - End IP:
52.4.198.118
- Rule name:
- Click Save.
- In Databox, go to Data Sources > + New connection.
- Search for Microsoft Azure for PostgreSQL and click Connect.
- Fill in the connection form:
- Data source name — a label for this connection in Databox.
- Host — the fully qualified server name of your Azure PostgreSQL instance, found on the Overview page in the Azure portal (e.g.,
myserver.postgres.database.azure.com). - Port — the port your instance listens on. The default for Azure Database for PostgreSQL is
5432. - User — the PostgreSQL role name created in Step 1. For Flexible Server, use the plain role name (e.g.,
databox). For Single Server, Azure requires the formatusername@servername(e.g.,databox@myserver). - Password — the password for that role.
- Database name (optional) — the specific database to connect to. Leave blank to connect at the server level.
- Timezone — the time zone used to interpret date values in query results. Defaults to
Etc/UTC.
- Toggle Use SSL/TLS to enable encrypted connections.
- Click Connect.

The Microsoft Azure for PostgreSQL integration supports the creation of datasets, which allow you to define and shape the specific data you want to use for reporting in Databox. Datasets make it easier to focus on the most relevant information, enabling you to filter, visualize, and analyze metrics across projects, teams, and clients without writing complex queries each time.
- Select a table: Pick the appropriate schema within that database.
- Select columns: Browse and select the specific columns (fields) from your tables or views to include in your dataset. These columns define the structure and content of your dataset.
For more advanced use cases, you can write a custom SQL query instead of selecting columns manually. This allows you to:
- Join multiple tables
- Apply filters and aggregations
- Format or transform data before importing it into Databox
Your query must return a valid tabular result to be used as a dataset.
- Azure Database for PostgreSQL documentation — Official Microsoft docs for Azure Database for PostgreSQL, covering Flexible Server and Single Server deployment modes, connectivity, security, backups, high availability, and monitoring.
- Azure Database for PostgreSQL Flexible Server networking overview — Guidance on public access, private access (VNet integration), and firewall rule configuration for Flexible Server.
For comprehensive details on metrics, data availability, templates, specifications, usage guidelines, and other key information, refer to the resources listed below.
FAQ
Does Databox support Azure Active Directory (Entra ID) authentication?
No. Databox connects to Azure Database for PostgreSQL using standard PostgreSQL username and password authentication. Azure Active Directory (Microsoft Entra ID) authentication is not supported. Make sure the role you create in Step 1 uses standard PostgreSQL authentication, not Azure AD authentication.
What should I do if Databox cannot connect to my Azure PostgreSQL instance?
Check the following in order:
- Public access is enabled on the instance (under Networking for Flexible Server, or Connection security for Single Server).
- A firewall rule exists with both start and end IP set to
52.4.198.118. - The PostgreSQL role was created with
LOGINprivileges and the correct password. - You are using the correct username format for your deployment mode (see below).
What username format should I use for Azure Database for PostgreSQL?
The required format depends on your deployment mode. Flexible Server accepts plain role names (e.g., databox). Single Server requires the format username@servername (e.g., databox@myserver), where myserver is the part of your hostname before .postgres.database.azure.com. If the connection fails with an authentication error, check that you are using the correct format for your deployment mode.