You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Microsoft Entra authentication in Azure Cosmos DB for PostgreSQL is currently in preview.
17
+
> Microsoft Entra ID authentication in Azure Cosmos DB for PostgreSQL is currently in preview.
18
18
> This preview version is provided without a service level agreement, and it's not recommended
19
19
> for production workloads. Certain features might not be supported or might have constrained
20
20
> capabilities.
21
21
>
22
22
> You can see a complete list of other new features in [preview features](product-updates.md#features-in-preview).
23
23
24
-
In this article, you configure authentication methods for Azure Cosmos DB for PostgreSQL. You manage Microsoft Entra admin users and native PostgreSQL roles for authentication with Azure Cosmos DB for PostgreSQL. You also learn how to use a Microsoft Entra token with Azure Cosmos DB for PostgreSQL.
24
+
In this article, you configure authentication methods for Azure Cosmos DB for PostgreSQL. You manage Microsoft Entra ID admin users and native PostgreSQL roles for authentication with Azure Cosmos DB for PostgreSQL. You also learn how to use a Microsoft Entra ID token with Azure Cosmos DB for PostgreSQL.
25
25
26
26
An Azure Cosmos DB for PostgreSQL cluster is created with one built-in native PostgreSQL role named 'citus'. You can add more native PostgreSQL roles after cluster provisioning is completed.
27
27
28
-
You can also configure Microsoft Entra authentication for Azure Cosmos DB for PostgreSQL. You can enable Microsoft Entra authentication in addition or instead of the native PostgreSQL authentication on your cluster. You can change authentication methods enabled on cluster at any point after the cluster is provisioned. When Microsoft Entra authentication is enabled, you can add multiple Microsoft Entra users to an Azure Cosmos DB for PostgreSQL cluster and make any of them administrators. Microsoft Entra user can be a user or a service principal.
28
+
You can also configure Microsoft Entra ID authentication for Azure Cosmos DB for PostgreSQL. You can enable Microsoft Entra ID authentication in addition or instead of the native PostgreSQL authentication on your cluster. You can change authentication methods enabled on cluster at any point after the cluster is provisioned. When Microsoft Entra ID authentication is enabled, you can add multiple Microsoft Entra ID users to an Azure Cosmos DB for PostgreSQL cluster and make any of them administrators. Microsoft Entra ID user can be a user or a service principal.
29
29
30
30
## Choose authentication method
31
31
You need to use Azure portal to configure authentication methods on an Azure Cosmos DB for PostgreSQL cluster.
32
32
33
-
Complete the following items on your Azure Cosmos DB for PostgreSQL cluster to enable or disable Microsoft Entra authentication and native PostgreSQL authentication.
33
+
Complete the following items on your Azure Cosmos DB for PostgreSQL cluster to enable or disable Microsoft Entra ID authentication and native PostgreSQL authentication.
34
34
35
35
1. On the cluster page, under the **Cluster management** heading, choose **Authentication** to open authentication management options.
36
-
1. In **Authentication methods** section, choose **PostgreSQL authentication only**, **Microsoft Entra authentication (preview)**, or **PostgreSQL and Microsoft Entra authentication (preview)** as the authentication method based on your requirements.
36
+
1. In **Authentication methods** section, choose **PostgreSQL authentication only**, **Microsoft Entra ID authentication (preview)**, or **PostgreSQL and Microsoft Entra ID authentication (preview)** as the authentication method based on your requirements.
37
37
38
-
Once done proceed with [configuring Microsoft Entra authentication](#configure-azure-active-directory-authentication) or [adding native PostgreSQL roles](#configure-native-postgresql-authentication) on **Authentication** page.
38
+
Once done proceed with [configuring Microsoft Entra ID authentication](#configure-azure-active-directory-authentication) or [adding native PostgreSQL roles](#configure-native-postgresql-authentication) on **Authentication** page.
Users need to be allowed to sign in to Azure Cosmos DB for PostgreSQL in the Microsoft Entra tenant. These steps should be performed once for the Microsoft Entra ID tenant that is going to be used for authentication on Azure Cosmos DB for PostgreSQL clusters.
46
+
Users need to be allowed to sign in to Azure Cosmos DB for PostgreSQL in the Microsoft Entra ID tenant. These steps should be performed once for the Microsoft Entra ID tenant that is going to be used for authentication on Azure Cosmos DB for PostgreSQL clusters.
47
47
48
48
> [!IMPORTANT]
49
49
> Microsoft Entra ID tenant administrator permissions are needed to make the change. See [guidance for troubleshooting permissions](/entra/identity/enterprise-apps/add-application-portal-configure#prerequisites).
@@ -64,12 +64,12 @@ az ad sp update --id b4fa09d8-5da5-4352-83d9-05c2a44cf431 --set accountEnabled=t
64
64
```
65
65
---
66
66
67
-
### Add Microsoft Entra admins to Azure Cosmos DB for PostgreSQL cluster
67
+
### Add Microsoft Entra ID admins to Azure Cosmos DB for PostgreSQL cluster
68
68
69
-
To add or remove Microsoft Entra roles on cluster, follow these steps on **Authentication** page:
69
+
To add or remove Microsoft Entra ID roles on cluster, follow these steps on **Authentication** page:
70
70
71
-
1. In **Microsoft Entra authentication (preview)** section, select **Add Microsoft Entra admins**.
72
-
1. In **Select Microsoft Entra Admins** panel, select one or more valid Microsoft Entra user or enterprise application in the current AD tenant to be a Microsoft Entra administrator on your Azure Cosmos DB for PostgreSQL cluster.
71
+
1. In **Microsoft Entra ID authentication (preview)** section, select **Add Microsoft Entra ID admins**.
72
+
1. In **Select Microsoft Entra ID Admins** panel, select one or more valid Microsoft Entra ID user or enterprise application in the current AD tenant to be a Microsoft Entra ID administrator on your Azure Cosmos DB for PostgreSQL cluster.
73
73
1. Use **Select** to confirm your choice.
74
74
1. In the **Authentication** page, select **Save** in the toolbar to save changes or proceed with adding native PostgreSQL roles.
75
75
@@ -79,15 +79,15 @@ To add Postgres roles on cluster, follow these steps on **Authentication** page:
79
79
80
80
1. In **PostgreSQL authentication** section, select **Add PostgreSQL role**.
81
81
1. Enter the role name and password. Select **Save**.
82
-
1. In the **Authentication** page, select **Save** in the toolbar to save changes or proceed with adding Microsoft Entra admin users.
82
+
1. In the **Authentication** page, select **Save** in the toolbar to save changes or proceed with adding Microsoft Entra ID admin users.
83
83
84
84
The native PostgreSQL user is created on the coordinator node of the cluster, and propagated to all the worker nodes. Roles created through the Azure portal have the LOGIN attribute, which means they’re true users who can sign in to the database.
## Connect to Azure Cosmos for PostgreSQL by using Microsoft Entra authentication
88
+
## Connect to Azure Cosmos for PostgreSQL by using Microsoft Entra ID authentication
89
89
90
-
Microsoft Entra integration works with standard PostgreSQL client tools like **psql**, which aren't Microsoft Entra aware and support only specifying the username and password when you're connecting to PostgreSQL. In such cases, the Microsoft Entra token is passed as the password.
90
+
Microsoft Entra ID integration works with standard PostgreSQL client tools like **psql**, which aren't Microsoft Entra ID aware and support only specifying the username and password when you're connecting to PostgreSQL. In such cases, the Microsoft Entra ID token is passed as the password.
91
91
92
92
We've tested the following clients:
93
93
@@ -105,13 +105,13 @@ Start by authenticating with Microsoft Entra ID by using the Azure CLI. This ste
105
105
az login
106
106
```
107
107
108
-
The command opens a browser window to the Microsoft Entra authentication page. It requires you to give your Microsoft Entra user ID and password.
108
+
The command opens a browser window to the Microsoft Entra ID authentication page. It requires you to give your Microsoft Entra ID user name and password.
109
109
110
110
<aname='retrieve-the-azure-ad-access-token'></a>
111
111
112
-
### Retrieve the Microsoft Entra access token
112
+
### Retrieve the Microsoft Entra ID access token
113
113
114
-
Use the Azure CLI to acquire an access token for the Microsoft Entra authenticated user to access Azure Cosmos for PostgreSQL. Here's an example:
114
+
Use the Azure CLI to acquire an access token for the Microsoft Entra ID authenticated user to access Azure Cosmos for PostgreSQL. Here's an example:
115
115
116
116
```azurecli-interactive
117
117
az account get-access-token --resource https://postgres.cosmos.azure.com
- Be sure to use the exact way the Azure user is spelled. Microsoft Entra ID user and group names are case-sensitive.
190
190
- If the name contains spaces, use a backslash (`\`) before each space to escape it.
191
191
- The access token's validity is 5 minutes to 90 minutes. You should get the access token before initiating the sign-in to Azure Cosmos for PostgreSQL.
192
192
193
-
You're now authenticated to your Azure Cosmos for PostgreSQL server through Microsoft Entra authentication.
193
+
You're now authenticated to your Azure Cosmos for PostgreSQL server through Microsoft Entra ID authentication.
194
194
195
195
## Manage native PostgreSQL roles
196
196
@@ -202,7 +202,7 @@ To update a user, visit the **Authentication** page for your cluster,
202
202
and select the ellipses **...** next to the user. The ellipses open a menu
203
203
to delete the user or reset their password.
204
204
205
-
The `citus` role is privileged and can't be deleted. However, `citus` role would be disabled, if 'Microsoft Entra authentication only' authentication method is selected for the cluster.
205
+
The `citus` role is privileged and can't be deleted. However, `citus` role would be disabled, if 'Microsoft Entra ID authentication only' authentication method is selected for the cluster.
206
206
207
207
## How to modify privileges for user roles
208
208
@@ -216,7 +216,7 @@ For example, to allow PostgreSQL `db_user` to read `mytable`, grant the permissi
216
216
GRANTSELECTON mytable TO db_user;
217
217
```
218
218
219
-
To grant the same permissions to Microsoft Entra role `[email protected]` use the following command:
219
+
To grant the same permissions to Microsoft Entra ID role `[email protected]` use the following command:
0 commit comments