Skip to content

Commit 66249e7

Browse files
Merge pull request #278839 from nachoalonsoportillo/patch-7
Update how-to-connect-with-managed-identity.md
2 parents 05dfef4 + e006a5c commit 66249e7

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

articles/postgresql/flexible-server/how-to-connect-with-managed-identity.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about how to connect and authenticate using managed identity
44
author: kabharati
55
ms.author: kabharati
66
ms.reviewer: maghan
7-
ms.date: 05/24/2024
7+
ms.date: 06/20/2024
88
ms.service: postgresql
99
ms.subservice: flexible-server
1010
ms.topic: how-to
@@ -105,10 +105,17 @@ psql -h SERVER --user USER DBNAME
105105

106106
You're now connected to the database you configured earlier.
107107

108-
## Connect using Managed Identity in C#
108+
## Connect using Managed Identity
109109

110110
This section shows how to get an access token using the VM's user-assigned managed identity and use it to call Azure Database for PostgreSQL flexible server. Azure Database for PostgreSQL flexible server natively supports Microsoft Entra authentication, so it can directly accept access tokens obtained using managed identities for Azure resources. When creating a connection to Azure Database for PostgreSQL flexible server, you pass the access token in the password field.
111111

112+
## Connect using Managed Identity in Python
113+
114+
For a Python code example, please refer to the [Quickstart: Use Python to connect and query data in Azure Database for PostgreSQL - Flexible Server
115+
](./connect-python.md)
116+
117+
## Connect using Managed Identity in C#
118+
112119
Here's a .NET code example of opening a connection to Azure Database for PostgreSQL flexible server using an access token. This code must run on the VM to use the system-assigned managed identity to obtain an access token from Microsoft Entra ID. Replace the values of HOST, USER (with `<identity_name>`), and DATABASE.
113120

114121
```csharp

0 commit comments

Comments
 (0)