Skip to content

Commit fc59827

Browse files
authored
Merge pull request #230327 from diberry/diberry/0310-app-service-permissions-requested
App service - update app-> obo with image
2 parents 4a92ec8 + 8efeeb0 commit fc59827

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
43.6 KB
Loading

articles/app-service/tutorial-auth-aad.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,15 @@ In the Cloud Shell, run the following commands on the frontend app to add the `s
230230

231231
```azurecli-interactive
232232
authSettings=$(az webapp auth show -g myAuthResourceGroup -n <front-end-app-name>)
233-
authSettings=$(echo "$authSettings" | jq '.properties' | jq '.identityProviders.azureActiveDirectory.login += {"loginParameters":["scope=openid profile email offline_access api://<back-end-client-id>/user_impersonation"]}')
233+
authSettings=$(echo "$authSettings" | jq '.properties' | jq '.identityProviders.azureActiveDirectory.login += {"loginParameters":["scope==openid offline_access api://<back-end-client-id>/user_impersonation"]}')
234234
az webapp auth set --resource-group myAuthResourceGroup --name <front-end-app-name> --body "$authSettings"
235235
```
236236

237237
The commands effectively add a `loginParameters` property with additional custom scopes. Here's an explanation of the requested scopes:
238238

239-
- `openid`, `profile`, and `email` are requested by App Service by default already. For information, see [OpenID Connect Scopes](../active-directory/develop/v2-permissions-and-consent.md#openid-connect-scopes).
240-
- `api://<back-end-client-id>/user_impersonation` is an exposed API in your backend app registration. It's the scope that gives you a JWT token that includes the backend app as a [token audience](https://wikipedia.org/wiki/JSON_Web_Token).
239+
- `openid` is requested by App Service by default already. For information, see [OpenID Connect Scopes](../active-directory/develop/v2-permissions-and-consent.md#openid-connect-scopes).
241240
- [offline_access](../active-directory/develop/v2-permissions-and-consent.md#offline_access) is included here for convenience (in case you want to [refresh tokens](#what-happens-when-the-frontend-token-expires)).
241+
- `api://<back-end-client-id>/user_impersonation` is an exposed API in your backend app registration. It's the scope that gives you a JWT token that includes the backend app as a [token audience](https://wikipedia.org/wiki/JSON_Web_Token).
242242

243243
> [!TIP]
244244
> - To view the `api://<back-end-client-id>/user_impersonation` scope in the Azure portal, go to the **Authentication** page for the backend app, click the link under **Identity provider**, then click **Expose an API** in the left menu.
@@ -318,6 +318,9 @@ if (bearerToken) {
318318

319319
1. Use the frontend web site in a browser. The URL is in the formate of `https://<front-end-app-name>.azurewebsites.net/`.
320320
1. The browser requests your authentication to the web app. Complete the authentication.
321+
322+
:::image type="content" source="./media/tutorial-auth-aad/browser-screenshot-authentication-permission-requested-pop-up.png" alt-text="Screenshot of browser authentication pop-up requesting permissions.":::
323+
321324
1. After authentication completes, the frontend application returns the home page of the app.
322325

323326
:::image type="content" source="./media/tutorial-auth-aad/app-home-page.png" alt-text="Screenshot of web browser showing frontend application after successfully completing authentication.":::

0 commit comments

Comments
 (0)