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/active-directory-b2c/custom-policies-series-call-rest-api.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ You need to deploy an app, which will serve as your external app. Your custom po
103
103
You can observe that when a user submits a wrong access code, you can return an error directly from the RESTAPI. Custom policies allow you to return an HTTP4xx error message, such as, 400 (bad request), or 409 (conflict) response status code with a response JSON body formatted as shown in`errorResponse`variable. The source of the accessCode in the app could be read from a database. Learn more about [Returning validation error message](restful-technical-profile.md#returning-validation-error-message).
104
104
105
105
1. To test the app works as expected, use the following steps:
106
-
1. In your terminal, run the `node index.js` command to start your app server on port `80`.
106
+
1. In your terminal, run the `node index.js` command to start your app server.
107
107
1. To make a POST request similar to the one shown below, you can use an HTTP client such as [Microsoft PowerShell](https://learn.microsoft.com/powershell/scripting/overview) or [Postman](https://www.postman.com/):
108
108
109
109
```http
@@ -154,10 +154,10 @@ You can test the app you've deployed by using an HTTP client such as [Microsoft
154
154
155
155
## Step 2- Call the RESTAPI
156
156
157
-
Now that your app is running, you need to make an HTTP call from your custom policy. AzureADB2C custom policy provides a [RESTful Technical Profile](restful-technical-profile.md#returning-validation-error-message) that you use to call an external service.
157
+
Now that your app is running, you need to make an HTTP call from your custom policy. AzureADB2C custom policy provides a [RESTful technical profile](restful-technical-profile.md#returning-validation-error-message) that you use to call an external service.
158
158
159
159
160
-
### Step 2.1- Define a RESTful Technical profile
160
+
### Step 2.1- Define a RESTful technical profile
161
161
162
162
In your `ContosoCustomPolicy.XML` file, locate the `ClaimsProviders` section, and define a newRESTful technical profile by using the following code:
163
163
@@ -194,7 +194,7 @@ From the protocol, you can observe that we configure the Technical Profile to us
194
194
195
195
- The *PartnerClaimType* attribute in the `InputClaim` specifies how you'll receive your data in the API.
In [Create branching in user journey by using Azure AD B2C custom policy](custom-policies-series-branch-in-user-journey.md), you validated the *accessCode* by using a Claims Transformation. In this article, you validate the *accessCode* by making an HTTP call to an external service. So, you'll need to update your custom policy to reflect the newapproach.
0 commit comments