System assigned managed identity

APPLIES TO: Azure Database for PostgreSQL - Flexible Server

This article provides step-by-step instructions to enable or disable a system assigned managed identity for an Azure Database for PostgreSQL flexible server.

Steps to enable for existing servers

Using the Azure portal:

  1. Locate your server in the portal, if you don't have it open. One way to do it is by typing the name of the server in the search bar. When the resource with the matching name is shown, select that resource.

    Screenshot that shows how to search for a resource using the search bar in the Azure portal.

  2. In the resource menu, under Security, select Identity.

    Screenshot that shows the Identity page, under Security, to enable the system assigned managed identity of an instance of Azure Database for PostgreSQL flexible server.

  3. In the System assigned managed identity section, select On.

    Screenshot that shows the Identity page, to enable the system assigned managed identity of an instance of Azure Database for PostgreSQL flexible server.

  4. Select Save.

    Screenshot that shows the Save button after having enabled the system assigned managed identity of an instance of Azure Database for PostgreSQL flexible server.

  5. When the process completes, a notification informs you that the system assigned managed identity is enabled.

    Screenshot that shows the notification informing that the system assigned managed identity is enabled.

Steps to disable for existing servers

Using the Azure portal:

  1. Locate your server in the portal, if you don't have it open. One way to do it is by typing the name of the server in the search bar. When the resource with the matching name is shown, select that resource.

    Screenshot that shows how to search for a resource using the search bar in the Azure portal.

  2. In the resource menu, under Security, select Identity.

    Screenshot that shows the Identity page, under Security, to disable the system assigned managed identity of an instance of Azure Database for PostgreSQL flexible server.

  3. In the System assigned managed identity section, select Off.

    Screenshot that shows the Identity page, to disable the system assigned managed identity of an instance of Azure Database for PostgreSQL flexible server.

  4. Select Save.

    Screenshot that shows the Save button after having disabled the system assigned managed identity of an instance of Azure Database for PostgreSQL flexible server.

  5. When the process completes, a notification informs you that the system assigned managed identity is disabled.

    Screenshot that shows the notification informing that the system assigned managed identity is disabled.

Steps to show currently assigned

Using the Azure portal:

  1. Locate your server in the portal, if you don't have it open. One way to do it is by typing the name of the server in the search bar. When the resource with the matching name is shown, select that resource.

    Screenshot that shows how to search for a resource using the search bar in the Azure portal.

  2. In the resource menu, select Overview

    Screenshot that shows the Overview page of an Azure Database for PostgreSQL flexible server.

  3. Select JSON View.

    Screenshot that shows how to select JSON View on an instance of Azure Database for PostgreSQL flexible server.

  4. In the Resource JSON panel that opens, find the identity property and, inside it, you can find the principalId and tenantId for the system assigned managed identity.

    Screenshot that shows where to find the principalId and tenantId of the system assigned managed identity.

Steps to verify in Microsoft Entra ID

Using the Azure portal:

  1. Locate the Enterprise Applications service in the portal, if you don't have it open. One way to do it is by typing its name in the search bar. When the service with the matching name is shown, select it.

    Screenshot that shows how to search for the Enterprise applications service using the search bar in the Azure portal.

  2. Choose Application Type == Managed Identity.

  3. Provide the name of your instance of Azure Database for PostgreSQL flexible server in the Search by application name or object ID text box.

    Screenshot that shows how to search for a managed identity using the Enterprise applications service interface in the Azure portal.