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
@@ -31,7 +31,7 @@ In this article, you'll learn how to:
31
31
32
32
## Scenario overview
33
33
34
-
In [Create branching in user journey by using Azure AD B2C custom policies](custom-policies-series-branch-in-user-journey.md), users who select *Personal Account* need to provide a valid invitation access code to proceed. We use a static access code, but real world apps don't work this way. If the service that issues the access codes is external to your custom policy, you must make a call to that service, and pass the access code input by the user for validation. If the access code is valid, the service returns an HTTP 200 (OK) response, and Azure AD B2C issues JWT token. Otherwise, the service returns an HTTP 409 (Conflict) response, and the use must re-enter an access code.
34
+
In [Create branching in user journey by using Azure AD B2C custom policies](custom-policies-series-branch-user-journey.md), users who select *Personal Account* need to provide a valid invitation access code to proceed. We use a static access code, but real world apps don't work this way. If the service that issues the access codes is external to your custom policy, you must make a call to that service, and pass the access code input by the user for validation. If the access code is valid, the service returns an HTTP 200 (OK) response, and Azure AD B2C issues JWT token. Otherwise, the service returns an HTTP 409 (Conflict) response, and the use must re-enter an access code.
35
35
36
36
:::image type="content" source="media/custom-policies-series-call-rest-api/screenshot-of-call-rest-api-call.png" alt-text="A flowchart of calling a R E S T A P I.":::
37
37
@@ -100,7 +100,7 @@ You need to deploy an app, which will serve as your external app. Your custom po
100
100
});
101
101
```
102
102
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).
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
106
1. In your terminal, run the `node index.js` command to start your app server.
@@ -196,9 +196,9 @@ From the protocol, you can observe that we configure the Technical Profile to us
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.
199
+
In [Create branching in user journey by using Azure AD B2C custom policy](custom-policies-series-branch-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.
200
200
201
-
Locate the *AccessCodeInputCollector*Technical Profile, and update the *ValidationTechnicalProfile* element's ReferenceId to *ValidateAccessCodeViaHttp*:
201
+
Locate the *AccessCodeInputCollector*technical profile, and update the *ValidationTechnicalProfile* element's *ReferenceId* to *ValidateAccessCodeViaHttp*:
0 commit comments