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/includes/quickstart-deploy-restful-api-app/deploy-restful-api-app-with-enterprise-plan.md
Use the following steps to create a new resource group.
129
+
Use the following steps to create a new resource group:
130
130
131
131
1. Use the following command to sign in to the Azure CLI:
132
132
@@ -168,10 +168,10 @@ Use the following steps to create a new resource group.
168
168
169
169
Use the following commands to install the Azure Spring Apps extension for the Azure CLI and register the `Microsoft.SaaS` namespace:
170
170
171
-
```azurecli
172
-
az extension add --name spring --upgrade
173
-
az provider register --namespace Microsoft.SaaS
174
-
```
171
+
```azurecli
172
+
az extension add --name spring --upgrade
173
+
az provider register --namespace Microsoft.SaaS
174
+
```
175
175
176
176
### 3.4. Create an Azure Spring Apps instance
177
177
@@ -204,24 +204,24 @@ Use the following commands to install the Azure Spring Apps extension for the Az
204
204
205
205
### 3.5. Prepare the PostgreSQL instance
206
206
207
-
The Spring web app uses H2 for the database in localhost, and Azure Database for PostgreSQL for the database in Azure.
207
+
The Spring web app uses H2 for the database in localhost and Azure Database for PostgreSQL for the database in Azure.
208
208
209
209
Use the following command to create a PostgreSQL instance:
210
210
211
-
```azurecli
212
-
az postgres flexible-server create \
213
-
--name ${POSTGRESQL_SERVER} \
214
-
--database-name ${POSTGRESQL_DB} \
215
-
--admin-user ${POSTGRESQL_ADMIN_USERNAME} \
216
-
--admin-password ${POSTGRESQL_ADMIN_PASSWORD} \
217
-
--public-access 0.0.0.0
218
-
```
211
+
```azurecli
212
+
az postgres flexible-server create \
213
+
--name ${POSTGRESQL_SERVER} \
214
+
--database-name ${POSTGRESQL_DB} \
215
+
--admin-user ${POSTGRESQL_ADMIN_USERNAME} \
216
+
--admin-password ${POSTGRESQL_ADMIN_PASSWORD} \
217
+
--public-access 0.0.0.0
218
+
```
219
219
220
220
Specifying `0.0.0.0` enables public access from any resources deployed within Azure to access your server.
221
221
222
222
### 3.6. Connect app instance to PostgreSQL instance
223
223
224
-
After the application instance and the PostgreSQL instance are created, the application instance can't access the PostgreSQL instance directly. Use the following steps to enable the app to connect to the PostgreSQL instance.
224
+
After the application instance and the PostgreSQL instance are created, the application instance can't access the PostgreSQL instance directly. Use the following steps to enable the app to connect to the PostgreSQL instance:
225
225
226
226
1. Use the following command to get the PostgreSQL instance's fully qualified domain name:
227
227
@@ -245,10 +245,13 @@ After the application instance and the PostgreSQL instance are created, the appl
245
245
246
246
### 3.7. Expose RESTful APIs
247
247
248
+
Use the following steps to expose the RESTful APIs:
249
+
248
250
1. Use the following command to create a Microsoft Entra ID application:
249
251
250
252
```azurecli
251
-
az ad app create --display-name ${TODO_APP_NAME} \
1. Use the following command to grant admin consent for the permissions you added:
@@ -400,44 +411,50 @@ The RESTful APIs act as a resource server, which is protected by Microsoft Entra
400
411
1. Use the following command to get the client ID of the `ToDoWeb` app used in the [Obtain the access token](#obtain-the-access-token) step:
401
412
402
413
```azurecli
403
-
az ad app show --id ${TODOWEB_APP_URL} \
404
-
--query appId \
405
-
--output tsv
414
+
az ad app show \
415
+
--id ${TODOWEB_APP_URL} \
416
+
--query appId \
417
+
--output tsv
406
418
```
407
419
408
420
#### Add user to access the RESTful APIs
409
421
410
-
1.Use the following steps to create a member user in your Microsoft Entra tenant. Then, the user can manage the data of the `ToDo` application through RESTful APIs:
422
+
Use the following command to create a member user in your Microsoft Entra tenant. Then, the user can manage the data of the `ToDo` application through RESTful APIs:
411
423
412
-
```azurecli
413
-
az ad user create --display-name ${NEW_MEMBER_USERNAME} \
414
-
--password ${NEW_MEMBER_PASSWORD} \
415
-
--user-principal-name ${USER_PRINCIPAL_NAME}
416
-
```
424
+
```azurecli
425
+
az ad user create \
426
+
--display-name ${NEW_MEMBER_USERNAME} \
427
+
--password ${NEW_MEMBER_PASSWORD} \
428
+
--user-principal-name ${USER_PRINCIPAL_NAME}
429
+
```
417
430
418
431
#### Update the OAuth2 configuration for Swagger UI authorization
419
432
433
+
Use the following steps to update the OAuth2 configuration:
434
+
420
435
1. Use the following command to get the object ID of the `ToDoWeb` app:
421
436
422
437
```azurecli
423
438
az ad app show --id ${TODOWEB_APP_URL} --query id
424
439
```
425
440
426
-
1. Use the following command to get the url of your `simple-todo-api` app:
441
+
1. Use the following command to get the URL of your `simple-todo-api` app:
427
442
428
443
```azurecli
429
-
az spring app show --name ${APP_NAME} \
444
+
az spring app show \
445
+
--name ${APP_NAME} \
430
446
--service ${AZURE_SPRING_APPS_NAME} \
431
447
--query properties.url
432
448
```
433
449
434
-
1. Use the following command to update the OAuth2 configuration for Swagger UI authorization, replace **\<object-id>** and **\<url>**with the parameters you got. Then, you can authorize users to acquire access tokens through the `ToDoWeb` app.
450
+
1. Use the following command to update the OAuth2 configuration for Swagger UI authorization, replacing the `<object-id>` and `<URL>` placeholders with the parameter values you got. Then, you can authorize users to acquire access tokens through the `ToDoWeb` app.
Copy file name to clipboardExpand all lines: articles/spring-apps/includes/quickstart-deploy-restful-api-app/validate-the-app-portal.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ You can now access the RESTful API to see if it works.
17
17
18
18
### 5.1. Request an access token
19
19
20
-
The RESTful APIs act as a resource server, which is protected by Microsoft Entra ID. Before acquiring an access token, you're required to register another application in Microsoft Entra ID and grant permissions to the client application, which is named `ToDoWeb`.
20
+
The RESTful APIs act as a resource server, which is protected by Microsoft Entra ID. Before acquiring an access token, you must register another application in Microsoft Entra ID and grant permissions to the client application, which is named `ToDoWeb`.
21
21
22
22
#### Register the client application
23
23
@@ -72,6 +72,6 @@ Use the following steps to update the OAuth2 configuration for Swagger UI author
72
72
73
73
1. Under **Manage**, select **Authentication**, select **Add a platform**, and then select **Single-page application**.
74
74
75
-
1. Use the format `<your-app-exposed-application-url-or-endpoint>/swagger-ui/oauth2-redirect.html` as the OAuth2 redirect URL in the **Redirect URIs** field, and then select **Configure**.
75
+
1. Use the format `<your-app-exposed-application-URL-or-endpoint>/swagger-ui/oauth2-redirect.html` as the OAuth2 redirect URL in the **Redirect URIs** field, and then select **Configure**.
76
76
77
77
:::image type="content" source="../../media/quickstart-deploy-restful-api-app/single-page-app-authentication.png" alt-text="Screenshot of the Azure portal that shows the Authentication page for Microsoft Entra ID." lightbox="../../media/quickstart-deploy-restful-api-app/single-page-app-authentication.png":::
Copy file name to clipboardExpand all lines: articles/spring-apps/quickstart-deploy-restful-api-app.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ The following diagram shows the architecture of the system:
47
47
- Global Administrator or Privileged Role Administrator, for granting consent for apps requesting any permission, for any API.
48
48
- Cloud Application Administrator or Application Administrator, for granting consent for apps requesting any permission for any API, except Microsoft Graph app roles (application permissions).
49
49
- A custom directory role that includes the [permission to grant permissions to applications](/entra/identity/role-based-access-control/custom-consent-permissions), for the permissions required by the application.
50
-
For more information, see [grant admin consent](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal#prerequisites).
50
+
For more information, see [Grant tenant-wide admin consent to an application](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal).
51
51
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the [Requirements](./how-to-enterprise-marketplace-offer.md#requirements) section of [Enterprise plan in Azure Marketplace](./how-to-enterprise-marketplace-offer.md).
52
52
-[Git](https://git-scm.com/downloads).
53
53
-[Java Development Kit (JDK)](/java/azure/jdk/), version 17.
@@ -60,7 +60,7 @@ For more information, see [grant admin consent](/entra/identity/enterprise-apps/
60
60
- Global Administrator or Privileged Role Administrator, for granting consent for apps requesting any permission, for any API.
61
61
- Cloud Application Administrator or Application Administrator, for granting consent for apps requesting any permission for any API, except Microsoft Graph app roles (application permissions).
62
62
- A custom directory role that includes the [permission to grant permissions to applications](/entra/identity/role-based-access-control/custom-consent-permissions), for the permissions required by the application.
63
-
For more information, see [grant admin consent](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal#prerequisites).
63
+
For more information, see [Grant tenant-wide admin consent to an application](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal).
64
64
- If you're deploying an Azure Spring Apps Enterprise plan instance for the first time in the target subscription, see the [Requirements](./how-to-enterprise-marketplace-offer.md#requirements) section of [Enterprise plan in Azure Marketplace](./how-to-enterprise-marketplace-offer.md).
65
65
-[Git](https://git-scm.com/downloads).
66
66
-[Java Development Kit (JDK)](/java/azure/jdk/), version 17.
@@ -80,7 +80,7 @@ For more information, see [grant admin consent](/entra/identity/enterprise-apps/
80
80
- Global Administrator or Privileged Role Administrator, for granting consent for apps requesting any permission, for any API.
81
81
- Cloud Application Administrator or Application Administrator, for granting consent for apps requesting any permission for any API, except Microsoft Graph app roles (application permissions).
82
82
- A custom directory role that includes the [permission to grant permissions to applications](/entra/identity/role-based-access-control/custom-consent-permissions), for the permissions required by the application.
83
-
For more information, see [grant admin consent](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal#prerequisites).
83
+
For more information, see [Grant tenant-wide admin consent to an application](/entra/identity/enterprise-apps/grant-admin-consent?pivots=portal).
84
84
-[Git](https://git-scm.com/downloads).
85
85
-[Java Development Kit (JDK)](/java/azure/jdk/), version 17.
86
86
- A Microsoft Entra tenant. For instructions on creating one, see [Quickstart: Create a new tenant in Microsoft Entra ID](../active-directory/fundamentals/create-new-tenant.md).
0 commit comments