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/api-management/howto-protect-backend-frontend-azure-ad-b2c.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ Open the Azure AD B2C blade in the portal and do the following steps.
99
99
1. Go to the Function Apps blade of the Azure portal, open your empty function app, then create a new In-Portal 'Webhook + API' function via the quickstart.
100
100
1. Paste the sample code from below into Run.csx over the existing code that appears.
101
101
102
-
```csharp
102
+
```csharp
103
103
104
104
usingSystem.Net;
105
105
usingMicrosoft.AspNetCore.Mvc;
@@ -120,7 +120,7 @@ Open the Azure AD B2C blade in the portal and do the following steps.
120
120
3. Select “Integrate” from the left-hand blade, then select ‘Advanced Editor’ in the top-right-hand corner of the pane.
121
121
4. Paste the sample code below over the existing json.
122
122
123
-
```json
123
+
```json
124
124
{
125
125
"bindings": [
126
126
{
@@ -140,7 +140,7 @@ Open the Azure AD B2C blade in the portal and do the following steps.
140
140
}
141
141
]
142
142
}
143
-
```
143
+
```
144
144
145
145
5. Switch back to the HttpTrigger1 tab, click 'Get Function URL', then copy the URL that appears.
146
146
@@ -213,7 +213,7 @@ You'll need to add CIDR formatted blocks of addresses to the IP restrictions pan
213
213
1. Switch back to the design tab and choose “All APIs”, then click the code view button to show the policy editor.
214
214
1. Edit the inbound section and paste the below xml so it reads like the following.
215
215
216
-
```xml
216
+
```xml
217
217
<inbound>
218
218
<validate-jwtheader-name="Authorization"failed-validation-httpcode="401"failed-validation-error-message="Unauthorized. Access token is missing or invalid.">
@@ -238,7 +238,7 @@ You'll need to add CIDR formatted blocks of addresses to the IP restrictions pan
238
238
</expose-headers>
239
239
</cors>
240
240
</inbound>
241
-
```
241
+
```
242
242
1. Edit the openid-config url to match your well-known Azure AD B2C endpoint for the sign up or sign in policy.
243
243
1. Edit the claim value to match the valid application ID, also known as a client ID for the backend API application and save.
244
244
1. Select the api operation below the "All APIs"
@@ -292,7 +292,7 @@ Now that the OAuth 2.0 user authorization is enabled on the `Echo API`, the Deve
292
292
1. Still in the storage account blade, select the 'Blobs' blade from the Blob Service section and click on the $web container that appears in the right-hand pane.
293
293
1. Save the code below to a file locally on your machine as index.html and then upload the file index.html to the $web container.
294
294
295
-
```html
295
+
```html
296
296
<!doctype html>
297
297
<htmllang="en">
298
298
<head>
@@ -404,8 +404,8 @@ Now that the OAuth 2.0 user authorization is enabled on the `Echo API`, the Deve
404
404
</script>
405
405
</body>
406
406
</html>
407
-
408
-
```
407
+
408
+
```
409
409
410
410
1. Browse to the Static Website Primary Endpoint you stored earlier in the last section.
411
411
@@ -421,15 +421,15 @@ Now that the OAuth 2.0 user authorization is enabled on the `Echo API`, the Deve
421
421
1. Create An APIM subscription key by heading to the API Management back to the API Management blade, selecting 'Subscriptions', and clicking 'Add Subscription' then saving the record. Clicking the Ellipsis (...) next to the created row will allow you to show the keys so you can copy the primary key.
0 commit comments