An Azure managed PostgreSQL database service for app development and deployment.
Hello Steven Featherstone
Your understanding of PostgreSQL privileges is correct. There is no documented customer-configurable mechanism that guarantees an ordinary PostgreSQL login can connect exclusively to one database while denying access to all Azure-managed databases on the same Flexible Server.
Answering your questions:
- Restricting
azure_sys
Microsoft says that Query Store views in azure_sys are accessible to PUBLIC.
Because azure_sys is owned by the Microsoft-managed azuresu role, customer administrators do not have the usual ownership or superuser authority to modify its database ACL.
I would not recommend modifying that ACL PUBLIC CONNECT grant with explicit service-role grants without written confirmation from Azure PostgreSQL engineering.
- Persistence across maintenance
There is no published guarantee that custom ACL changes to azure_sys survive servicing, upgrades, failover, or restore.
- Supported access boundaries
For customer-created databases:
REVOKE ALL ON DATABASE customer_db FROM PUBLIC;
GRANT CONNECT ON DATABASE customer_db TO customer_reader;
You must additionally grant appropriate schema and object privileges. However, this does not deny access to Azure-managed databases.
For strict customer isolation, consider separate Flexible Servers. This isolates customer workloads and their Query Store history, but does not prevent users from accessing azure_sys on their own server.
If preventing any direct azure_sys access is mandatory, consider exposing customer data through a controlled application/API rather than distributing direct PostgreSQL credentials.
- Restrictions on
postgresandtemplate1
PostgreSQL supports database-level CONNECT restrictions, but Microsoft does not publish a service-specific compatibility matrix for changing these default databases' ACLs.
I would avoid modifying them without confirmation, particularly template1, which is used when creating databases.
-
pgaadauth_sync_roles_for_group_members()
Microsoft documents this routine for synchronizing Microsoft Entra group membership, but does not specify its complete runtime caller-authorization checks or whether modifying its EXECUTE ACL is supported.
You can inspect its metadata without executing it:
SELECT p.oid::regprocedure,
pg_get_userbyid(p.proowner) AS owner,
p.prosecdef AS security_definer,
p.proacl
FROM pg_proc p
WHERE p.proname =
'pgaadauth_sync_roles_for_group_members';
This reveals catalog privileges and function security mode, but not any additional internal authorization checks.
References: