Skip to content

Commit cfff707

Browse files
authored
Update add-api-connector-token-enrichment.md
1 parent 392f0b5 commit cfff707

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

articles/active-directory-b2c/add-api-connector-token-enrichment.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
title: Token enrichment - Azure Active Directory B2C
23
description: Enrich tokens with claims from external identity data sources using APIs or outbound webhooks.
34
services: active-directory-b2c
@@ -7,6 +8,7 @@ manager: CelesteDG
78
ms.service: active-directory
89
ms.workload: identity
910
ms.topic: how-to
11+
1012
ms.date: 01/17/2023
1113
ms.author: godonnell
1214
ms.subservice: B2C
@@ -32,42 +34,30 @@ You can create an API endpoint using one of our [samples](api-connector-samples.
3234
To use an [API connector](api-connectors-overview.md), you first create the API connector and then enable it in a user flow.
3335

3436
1. Sign in to the [Azure portal](https://portal.azure.com/).
35-
2. Under **Azure services**, select **Azure AD B2C**.
36-
4. Select **API connectors**, and then select **New API connector**.
3737
1. Under **Azure services**, select **Azure AD B2C**.
3838
1. Select **API connectors**, and then select **New API connector**.
3939

40-
![Screenshot of the basic API connector configuration](media/add-api-connector-token-enrichment/api-connector-new.png)
4140
![Screenshot showing the API connectors page in the Azure portal with the New API Connector button highlighted](media/add-api-connector-token-enrichment/api-connector-new.png)
4241

43-
5. Provide a display name for the call. For example, **Enrich token from external source**.
44-
6. Provide the **Endpoint URL** for the API call.
45-
7. Choose the **Authentication type** and configure the authentication information for calling your API. Learn how to [Secure your API Connector](secure-rest-api.md).
4642
1. Provide a display name for the call. For example, **Enrich token from external source**.
4743
1. Provide the **Endpoint URL** for the API call.
4844
1. Choose the **Authentication type** and configure the authentication information for calling your API. Learn how to [Secure your API Connector](secure-rest-api.md).
4945

50-
![Screenshot of authentication configuration for an API connector](media/add-api-connector-token-enrichment/api-connector-config.png)
5146
![Screenshot showing sample authentication configuration for an API connector](media/add-api-connector-token-enrichment/api-connector-config.png)
5247

53-
8. Select **Save**.
5448
1. Select **Save**.
5549

5650
## Enable the API connector in a user flow
5751

5852
Follow these steps to add an API connector to a sign-up user flow.
5953

6054
1. Sign in to the [Azure portal](https://portal.azure.com/).
61-
2. Under **Azure services**, select **Azure AD B2C**.
62-
4. Select **User flows**, and then select the user flow you want to add the API connector to.
63-
5. Select **API connectors**, and then select the API endpoint you want to invoke at the **Before sending the token (preview)** step in the user flow:
6455
1. Under **Azure services**, select **Azure AD B2C**.
6556
1. Select **User flows**, and then select the user flow you want to add the API connector to.
6657
1. Select **API connectors**, and then select the API endpoint you want to invoke at the **Before sending the token (preview)** step in the user flow:
6758

6859
![Screenshot of selecting an API connector for a user flow step](media/add-api-connector-token-enrichment/api-connectors-user-flow-select.png)
6960

70-
6. Select **Save**.
7161
1. Select **Save**.
7262

7363
This step only exists for **Sign up and sign in (Recommended)**, **Sign up (Recommended)**, and **Sign in (Recommended)** user flows.
@@ -129,12 +119,13 @@ Content-type: application/json
129119
```
130120
| Parameter | Type | Required | Description |
131121
| -------------------------------------------------- | ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
132-
| version | String | Yes | The version of your API. |
122+
git | version | String | Yes | The version of your API. |
133123
| action | String | Yes | Value must be `Continue`. |
134124
| \<builtInUserAttribute> | \<attribute-type> | No | They can be returned in the token if selected as an **Application claim**. |
135125
| \<extension\_{extensions-app-id}\_CustomAttribute> | \<attribute-type> | No | The claim does not need to contain `_<extensions-app-id>_`, it is *optional*. They can returned in the token if selected as an **Application claim**. |
136126
::: zone-end
137127
::: zone pivot="b2c-custom-policy"
128+
138129
In this scenario, we enrich the user's token data by integrating with a corporate line-of-business workflow. During sign-up or sign-in with local or federated account, Azure AD B2C invokes a REST API to get the user's extended profile data from a remote data source. In this sample, Azure AD B2C sends the user's unique identifier, the objectId. The REST API then returns the user's account balance (a random number). Use this sample as a starting point to integrate with your own CRM system, marketing database, or any line-of-business workflow.
139130
You can also design the interaction as a validation technical profile. This is suitable when the REST API will be validating data on screen and returning claims. For more information, see [Walkthrough: Add an API connector to a sign-up user flow](add-api-connector.md).
140131
## Prerequisites
@@ -335,9 +326,9 @@ In general, it's helpful to use the logging tools enabled by your web API servic
335326
* Monitor your API for long response times.
336327
Additionally, Azure AD B2C logs metadata about the API transactions that happen during user authentications via a user flow. To find these:
337328
1. Go to **Azure AD B2C**
338-
2. Under **Activities**, select **Audit logs**.
339-
3. Filter the list view: For **Date**, select the time interval you want, and for **Activity**, select **An API was called as part of a user flow**.
340-
4. Inspect individual logs. Each row represents an API connector attempting to be called during a user flow. If an API call fails and a retry occurs, it's still represented as a single row. The `numberOfAttempts` indicates the number of times your API was called. This value can be `1`or `2`. Other information about the API call is detailed in the logs.
329+
1. Under **Activities**, select **Audit logs**.
330+
1. Filter the list view: For **Date**, select the time interval you want, and for **Activity**, select **An API was called as part of a user flow**.
331+
1. Inspect individual logs. Each row represents an API connector attempting to be called during a user flow. If an API call fails and a retry occurs, it's still represented as a single row. The `numberOfAttempts` indicates the number of times your API was called. This value can be `1`or `2`. Other information about the API call is detailed in the logs.
341332
![Screenshot of an example audit log with API connector transaction](media/add-api-connector-token-enrichment/example-anonymized-audit-log.png)
342333
::: zone-end
343334
## Next steps

0 commit comments

Comments
 (0)