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/spring-apps/connect-managed-identity-to-azure-sql.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,12 @@ This article shows you how to create a managed identity for an app deployed to A
26
26
27
27
* An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
28
28
*[Azure CLI](/cli/azure/install-azure-cli) version 2.45.0 or higher.
29
-
* Follow the [Spring Data JPA tutorial](/azure/developer/java/spring-framework/configure-spring-data-jpa-with-azure-sql-server) to provision an Azure SQL Database and get it work with a Java app locally
30
-
* Follow the [Azure Spring Apps system-assigned managed identity tutorial](./how-to-enable-system-assigned-managed-identity.md) to provision an an in Azure Spring Apps with MI enabled
29
+
* Follow the [Spring Data JPA tutorial](/azure/developer/java/spring-framework/configure-spring-data-jpa-with-azure-sql-server) to provision an Azure SQL Database and get it work with a Java app locally.
30
+
* Follow the [Azure Spring Apps system-assigned managed identity tutorial](./how-to-enable-system-assigned-managed-identity.md) to provision an app in Azure Spring Apps with managed identity enabled.
31
31
32
32
## Connect to Azure SQL Database with a managed identity
33
33
34
-
You can connect your application deployed to Azure Spring Apps to an Azure SQL Database with a managed identity by following manual steps or using [Service Connector](../service-connector/overview.md).
34
+
You can connect your application to an Azure SQL Database with a managed identity by following manual steps or using [Service Connector](../service-connector/overview.md).
35
35
36
36
### [Manual configuration](#tab/manual)
37
37
@@ -40,14 +40,14 @@ You can connect your application deployed to Azure Spring Apps to an Azure SQL D
40
40
Connect to your SQL server and run the following SQL query:
41
41
42
42
```sql
43
-
CREATE USER [<MIName>] FROM EXTERNAL PROVIDER;
44
-
ALTER ROLE db_datareader ADD MEMBER [<MIName>];
45
-
ALTER ROLE db_datawriter ADD MEMBER [<MIName>];
46
-
ALTER ROLE db_ddladmin ADD MEMBER [<MIName>];
43
+
CREATE USER [<managed-identity-name>] FROM EXTERNAL PROVIDER;
44
+
ALTER ROLE db_datareader ADD MEMBER [<managed-identity-name>];
45
+
ALTER ROLE db_datawriter ADD MEMBER [<managed-identity-name>];
46
+
ALTER ROLE db_ddladmin ADD MEMBER [<managed-identity-name>];
47
47
GO
48
48
```
49
49
50
-
The value of the `<MIName>` placeholder follows the rule `<service-instance-name>/apps/<app-name>`; for example: `myspringcloud/apps/sqldemo`. You can also query the MIName with Azure CLI:
50
+
The value of the `<managed-identity-name>` placeholder follows the rule `<service-instance-name>/apps/<app-name>`; for example: `myspringcloud/apps/sqldemo`. You can also use the following command to query the managed identity name with Azure CLI:
51
51
52
52
```azurecli
53
53
az ad sp show --id <identity-object-ID> --query displayName
@@ -106,7 +106,7 @@ Configure your app deployed to Azure Spring Apps to connect to an Azure SQL Data
106
106
107
107
## Build and deploy the app to Azure Spring Apps
108
108
109
-
Rebuild the app and deploy it to the Azure Spring Apps provisioned in the second bullet point under Prerequisites. Now you have a Spring Boot application, authenticated by a managed identity, that uses JPA to store and retrieve data from an Azure SQL Database in Azure Spring Apps.
109
+
Rebuild the app and deploy it to the Azure Spring Apps provisioned in the second bullet point under Prerequisites. You now have a Spring Boot application, authenticated by a managed identity, that uses JPA to store and retrieve data from an Azure SQL Database in Azure Spring Apps.
0 commit comments