Check ID: postgresql_flexible_server_entra_id_authentication_enabled
Provider: Azure
Service: postgresql
Severity: MEDIUM
Categories: identity-access
Resource type: microsoft.dbforpostgresql/flexibleservers

What this check verifies

PostgreSQL Flexible Servers must set authConfig.activeDirectoryAuth to Enabled and keep at least one Microsoft Entra administrator assigned so database sessions inherit centrally governed identities instead of unmanaged PostgreSQL accounts.

Risk

Without Entra ID authentication, stolen local passwords bypass MFA and conditional access, enabling persistent database logins. Missing administrators leaves the feature unusable, blocking security teams from rotating duties and allowing unauthorized access or privilege escalation.

Recommendation

Federate PostgreSQL Flexible Server access through Microsoft Entra ID so MFA, conditional access, and centralized RBAC govern logins. Maintain at least one delegated administrator group and rotate membership through identity governance processes.

Remediation

az postgres flexible-server update —resource-group <resourceGroupName> —name <serverName> —active-directory-auth Enabled az postgres flexible-server ad-admin create —resource-group <resourceGroupName> —server-name <serverName> —object-id <objectId> —display-name <displayName> —type User

References

Where this check fires

This check runs on every scheduled scan against your Azure account. Findings appear at Cloud Security → Findings filterable by Check ID = postgresql_flexible_server_entra_id_authentication_enabled. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Azure checks