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
Copy file name to clipboardExpand all lines: articles/postgresql/flexible-server/concepts-azure-ad-authentication.md
+46-3Lines changed: 46 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ ms.topic: conceptual
18
18
Microsoft Entra authentication is a mechanism of connecting to Azure Database for PostgreSQL flexible server using identities defined in Microsoft Entra ID.
19
19
With Microsoft Entra authentication, you can manage database user identities and other Microsoft services in a central location, which simplifies permission management.
20
20
21
-
Benefits of using Microsoft Entra ID include:
21
+
**Benefits of using Microsoft Entra ID include:**
22
22
23
23
- Authentication of users across Azure Services in a uniform way
24
24
- Management of password policies and password rotation in a single place
@@ -27,6 +27,7 @@ Benefits of using Microsoft Entra ID include:
27
27
- Microsoft Entra authentication uses PostgreSQL database roles to authenticate identities at the database level
28
28
- Support of token-based authentication for applications connecting to Azure Database for PostgreSQL flexible server
## Microsoft Entra authentication (Azure Database for PostgreSQL single Server vs Azure Database for PostgreSQL flexible server)
@@ -55,9 +56,11 @@ The following high-level diagram summarizes how authentication works using Micro
55
56
56
57
Use these steps to configure Microsoft Entra ID with Azure Database for PostgreSQL flexible server [Configure and sign in with Microsoft Entra ID for Azure Database for PostgreSQL - Flexible Server](how-to-configure-sign-in-azure-ad-authentication.md).
57
58
58
-
## Manage PostgreSQL Access For AD Principals
59
+
## Differences Between PostgreSQL Administrator and Microsoft Entra Administrator
60
+
61
+
When Microsoft Entra authentication is enabled on your Flexible Server and Microsoft Entra principal is added as a **Microsoft Entra administrator** the account not only gets the same privileges as the original **PostgreSQL administrator** but also it can manage other Microsoft Entra ID enabled roles on the server. Unlike the PostgreSQL administrator, who can only create local password-based users, the Microsoft Entra administrator has the authority to manage both Entra users and local password-based users.
59
62
60
-
When Microsoft Entra authentication is enabled and Microsoft Entra principal is added as a Microsoft Entra administrator the account gets the same privileges as the original PostgreSQL administrator. Only Microsoft Entra administrator can manage other Microsoft Entra ID enabled roles on the server using Azure portal or Database API. The Microsoft Entra administrator sign-in can be a Microsoft Entra user, Microsoft Entra group, Service Principal or Managed Identity. Using a group account as an administrator enhances manageability by allowing you to centrally add and remove group members in Microsoft Entra ID without changing the users or permissions in the Azure Database for PostgreSQL flexible server instance. Multiple Microsoft Entra administrators can be configured at any time and you can optionally disable password authentication to an Azure Database for PostgreSQL flexible server instance for better auditing and compliance needs.
63
+
Microsoft Entra administrator can be a Microsoft Entra user, Microsoft Entra group, Service Principal, or Managed Identity. Utilizing a group account as an administrator enhances manageability, as it permits centralized addition and removal of group members in Microsoft Entra ID without changing the users or permissions within the Azure Database for PostgreSQL flexible server instance. Multiple Microsoft Entra administrators can be configured concurrently, and you have the option to deactivate password authentication to an Azure Database for PostgreSQL flexible server instance for enhanced auditing and compliance requirements.
61
64
62
65
![admin structure][2]
63
66
@@ -85,6 +88,7 @@ Once you've authenticated against the Active Directory, you then retrieve a toke
85
88
86
89
## Other considerations
87
90
91
+
- Microsoft user assigned tokens are
88
92
- Multiple Microsoft Entra principals (a user, group, service principal or managed identity) can be configured as Microsoft Entra Administrator for an Azure Database for PostgreSQL flexible server instance at any time.
89
93
- Only a Microsoft Entra administrator for PostgreSQL can initially connect to the Azure Database for PostgreSQL flexible server instance using a Microsoft Entra account. The Active Directory administrator can configure subsequent Microsoft Entra database users.
90
94
- If a Microsoft Entra principal is deleted from Microsoft Entra ID, it still remains as PostgreSQL role, but it will no longer be able to acquire new access token. In this case, although the matching role still exists in the database it won't be able to authenticate to the server. Database administrators need to transfer ownership and drop roles manually.
@@ -94,6 +98,45 @@ Once you've authenticated against the Active Directory, you then retrieve a toke
94
98
95
99
- Azure Database for PostgreSQL flexible server matches access tokens to the database role using the user’s unique Microsoft Entra user ID, as opposed to using the username. If a Microsoft Entra user is deleted and a new user is created with the same name, Azure Database for PostgreSQL flexible server considers that a different user. Therefore, if a user is deleted from Microsoft Entra ID and a new user is added with the same name the new user won't be able to connect with the existing role.
96
100
101
+
## Frequently asked questions
102
+
103
+
104
+
***What are different authentication modes available in Azure Database for PostgreSQL Flexible Server?**
105
+
106
+
Azure Database for PostgreSQL flexible server supports three modes of authentication namely **PostgreSQL authentication only**, **Microsoft Entra authentication only**, and **PostgreSQL and Microsoft Entra authentication**.
107
+
108
+
***Can I configure multiple Microsoft Entra administrators on my Flexible Server?**
109
+
110
+
Yes. You can configure multiple Entra administrators on your flexible server. During provisioning, you can only set a single Microsoft Entra admin but once the server is created you can set as many Microsoft Entra administrators as you want by going to **Authentication** blade.
111
+
112
+
***Is Microsoft Entra administrators only a Microsoft Entra user?****
113
+
114
+
No. Microsoft Entra administrator can be a user, group, service principal or managed identity.
115
+
116
+
***Can Microsoft Entra administrator create local password-based users?**
117
+
118
+
Unlike the PostgreSQL administrator, who can only create local password-based users, the Microsoft Entra administrator has the authority to manage both Entra users and local password-based users.
119
+
120
+
***What happens when I enable Microsoft Entra Authentication on my flexible server?**
121
+
122
+
When Microsoft Entra Authentication is set at the server level, PGAadAuth extension gets enabled and results in a server restart.
123
+
124
+
***How do I log in using Microsoft Entra Authentication?**
125
+
126
+
You can use client tools such as psql, pgadmin etc. to login to your flexible server. Please use the Microsoft Entra ID as **User name** and use your **Entra token** as your password which is generated using azlogin.
127
+
128
+
***How do I generate my token?**
129
+
130
+
Please use the below steps to generate your token. [Generate Token](how-to-configure-sign-in-azure-ad-authentication.md).
131
+
132
+
***What is the difference between group login and individual login?**
133
+
134
+
The only difference between logging in as **Microsoft Entra group member** and an individual **Entra user** lies in the **Username**, while logging in as an individual user you provide your individual Microsoft Entra ID where whereas you'll utilize the group name while logging in as a group member. Regardless, in both scenarios, you'll employ the same individual Entra token as the password.
135
+
136
+
***What is the token lifetime?**
137
+
138
+
User tokens are valid for up to 1 hour whereas System Assigned Managed Identity tokens are valid for up to 24 hours.
0 commit comments