Skip to content

Commit 0e42b88

Browse files
authored
Fix for new Functions /App Service portal UX
Fix for https://github.com/MicrosoftDocs/azure-docs/issues/92564
1 parent 0ebf97d commit 0e42b88

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

articles/api-management/howto-protect-backend-frontend-azure-ad-b2c.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,27 +182,26 @@ Open the Azure AD B2C blade in the portal and do the following steps.
182182

183183
1. Two extra areas in the function app need to be configured (Authorization and Network Restrictions).
184184
1. Firstly Let's configure Authentication / Authorization, so navigate back to the root blade of the function app via the breadcrumb.
185-
1. Next select 'Authentication / Authorization' (under 'Settings').
186-
1. Turn on the App Service Authentication feature.
187-
1. Set the Action to take when request is not authenticated dropdown to "Log in with Azure Active Directory".
188-
1. Under 'Authentication Providers', choose ‘Azure Active Directory’.
189-
1. Choose ‘Advanced’ from the Management Mode switch.
190-
1. Paste the Backend application's [Application] Client ID (from Azure AD B2C) into the ‘Client ID’ box
185+
1. Next select 'Authentication' (under 'Settings').
186+
1. Click 'Add Identity Provider'
187+
1. From the Identity Provider dropdown, select 'Microsoft'
188+
1. For App Registration, select 'Provide the details of an existing app registration'
189+
1. Paste the Backend application's client ID (from Azure AD B2C) into the ‘Application (client) ID’ box (we recorded this configuration earlier).
191190
1. Paste the Well-known open-id configuration endpoint from the sign-up and sign-in policy into the Issuer URL box (we recorded this configuration earlier).
192-
1. Click 'Show Secret' and paste the Backend application's client secret into the appropriate box.
193-
1. Select OK, which takes you back to the identity provider selection blade/screen.
194-
1. Leave [Token Store](../app-service/overview-authentication-authorization.md#token-store) enabled under advanced settings (default).
191+
1. Paste the Backend application's client secret into the appropriate box (we recorded this configuration earlier).
192+
1. For 'Unauthenticated requests', select 'HTTP 401 Unauthorized: recommended for APIs'
193+
1. Leave [Token Store](../app-service/overview-authentication-authorization.md#token-store) enabled (default).
195194
1. Click 'Save' (at the top left of the blade).
196195

197196
> [!IMPORTANT]
198197
> Now your Function API is deployed and should throw 401 responses if the correct JWT is not supplied as an Authorization: Bearer header, and should return data when a valid request is presented.
199-
> You added additional defense-in-depth security in EasyAuth by configuring the 'Login With Azure AD' option to handle unauthenticated requests. Be aware that this will change the unauthorized request behavior between the Backend Function App and Frontend SPA as EasyAuth will issue a 302 redirect to Azure Active Directory instead of a 401 Not Authorized response, we will correct this by using API Management later.
198+
> You added additional defense-in-depth security in EasyAuth by configuring the 'Login With Azure AD' option to handle unauthenticated requests.
200199
>
201200
> We still have no IP security applied, if you have a valid key and OAuth2 token, anyone can call this from anywhere - ideally we want to force all requests to come via API Management.
202201
>
203202
> If you're using APIM Consumption tier then [there isn't a dedicated Azure API Management Virtual IP](./api-management-howto-ip-addresses.md#ip-addresses-of-consumption-tier-api-management-service) to allow-list with the functions access-restrictions. In the Azure API Management Standard SKU and above [the VIP is single tenant and for the lifetime of the resource](./api-management-howto-ip-addresses.md#changes-to-the-ip-addresses). For the Azure API Management Consumption tier, you can lock down your API calls via the shared secret function key in the portion of the URI you copied above. Also, for the Consumption tier - steps 12-17 below do not apply.
204203
205-
1. Close the 'Authentication / Authorization' blade
204+
1. Close the 'Authentication' blade from the App Service / Functions portal.
206205
1. Open the *API Management blade of the portal*, then open *your instance*.
207206
1. Record the Private VIP shown on the overview tab.
208207
1. Return to the *Azure Functions blade of the portal* then open *your instance* again.
@@ -463,4 +462,4 @@ The steps above can be adapted and edited to allow many different uses of Azure
463462
* Check out more [videos](https://azure.microsoft.com/documentation/videos/index/?services=api-management) about API Management.
464463
* For other ways to secure your back-end service, see [Mutual Certificate authentication](api-management-howto-mutual-certificates.md).
465464
* [Create an API Management service instance](get-started-create-service-instance.md).
466-
* [Manage your first API](import-and-publish.md).
465+
* [Manage your first API](import-and-publish.md).

0 commit comments

Comments
 (0)