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/how-to-connect-with-managed-identity.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,16 +49,27 @@ az ad sp list --display-name vm-name --query [*].appId --out tsv
49
49
50
50
## Create an Azure Database for PostgreSQL flexible server user for your Managed Identity
51
51
52
-
Now, connect as the Microsoft Entra administrator user to your Azure Database for PostgreSQL flexible server database, and run the following SQL statements, replacing `CLIENT_ID` with the client ID you retrieved for your system-assigned managed identity:
52
+
Now, connect as the Microsoft Entra administrator user to your Azure Database for PostgreSQL flexible server database, and run the following SQL statements, replacing `<identity_name>` with the name of the resources for which you created a system-assigned managed identity:
For more information on managing Microsoft Entra ID enabled database roles, see [how to manage Microsoft Entra ID enabled Azure Database for PostgreSQL - Flexible Server roles](./how-to-manage-azure-ad-users.md)
59
67
60
68
The managed identity now has access when authenticating with the identity name as a role name and the Microsoft Entra token as a password.
61
69
70
+
> [!Note]
71
+
> If the managed identity is not valid, an error is returned: `ERROR: Could not validate AAD user <ObjectId> because its name is not found in the tenant. [...]`.
72
+
62
73
## Retrieve the access token from the Azure Instance Metadata service
63
74
64
75
Your application can now retrieve an access token from the Azure Instance Metadata service and use it for authenticating with the database.
@@ -92,7 +103,7 @@ You're now connected to the database you configured earlier.
92
103
93
104
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.
94
105
95
-
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, DATABASE, and CLIENT_ID.
106
+
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.
Copy file name to clipboardExpand all lines: articles/virtual-machines/linux/how-to-resize-encrypted-lvm.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,7 +202,7 @@ When you need to add a new disk to increase the VG size, extend your traditional
202
202

203
203
204
204
```bash
205
-
sudo lsbk
205
+
sudo lsblk
206
206
```
207
207
208
208

0 commit comments