Skip to content

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Diff for: articles/app-service/tutorial-auth-aad.md

+4-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: cephalin
66
ms.author: cephalin
77
ms.devlang: csharp
88
ms.topic: tutorial
9-
ms.date: 3/08/2023
9+
ms.date: 12/31/2023
1010
ms.custom: seodec18, devx-track-azurecli, engagement-fy23, AppServiceIdentity
1111
zone_pivot_groups: app-service-platform-windows-linux
1212
# Requires non-internal subscription - internal subscriptions doesn't provide permission to correctly configure Microsoft Entra apps
@@ -186,23 +186,16 @@ If you stop here, you have a self-contained app that's already secured by the Ap
186186

187187
1. In the [Azure portal](https://portal.azure.com) menu, select **Resource groups** or search for and select *Resource groups* from any page.
188188

189-
1. In **Resource groups**, find and select your resource group. In **Overview**, select your backend app's management page.
189+
1. In **Resource groups**, find and select your resource group. In **Overview**, select your frontend app's management page.
190190

191-
:::image type="content" source="./media/tutorial-auth-aad/portal-navigate-back-end.png" alt-text="Screenshot of the Resource groups window, showing the Overview for an example resource group and a backend app's management page selected.":::
192-
193-
1. In your backend app's left menu, select **Authentication**, and then select **Add identity provider**.
191+
1. In your frontend app's left menu, select **Authentication**, and then select **Add identity provider**.
194192

195193
1. In the **Add an identity provider** page, select **Microsoft** as the **Identity provider** to sign in Microsoft and Microsoft Entra identities.
196194

197195
1. Accept the default settings and select **Add**.
198196

199-
:::image type="content" source="./media/tutorial-auth-aad/configure-auth-back-end.png" alt-text="Screenshot of the backend app's left menu showing Authentication/Authorization selected and settings selected in the right menu.":::
200-
201197
1. The **Authentication** page opens. Copy the **Client ID** of the Microsoft Entra application to a notepad. You need this value later.
202198

203-
:::image type="content" source="./media/tutorial-auth-aad/get-application-id-back-end.png" alt-text="Screenshot of the Microsoft Entra Settings window showing the Microsoft Entra App, and the Microsoft Entra Applications window showing the Client ID to copy.":::
204-
205-
206199
### Grant frontend app access to backend
207200

208201
Now that you've enabled authentication and authorization to both of your apps, each of them is backed by an AD application. To complete the authentication, you need to do three things:
@@ -231,6 +224,7 @@ The frontend app now has the required permissions to access the backend app as t
231224
In the Cloud Shell, run the following commands on the frontend app to add the `scope` parameter to the authentication setting `identityProviders.azureActiveDirectory.login.loginParameters`. Replace *\<front-end-app-name>* and *\<back-end-client-id>*.
232225

233226
```azurecli-interactive
227+
az extension add --name authV2
234228
authSettings=$(az webapp auth show -g myAuthResourceGroup -n <front-end-app-name>)
235229
authSettings=$(echo "$authSettings" | jq '.properties' | jq '.identityProviders.azureActiveDirectory.login += {"loginParameters":["scope=openid offline_access api://<back-end-client-id>/user_impersonation"]}')
236230
az webapp auth set --resource-group myAuthResourceGroup --name <front-end-app-name> --body "$authSettings"

0 commit comments

Comments
 (0)