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/partner-onfido.md
+83-92Lines changed: 83 additions & 92 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,167 +4,158 @@ titleSuffix: Azure AD B2C
4
4
description: Learn how to integrate Azure AD B2C authentication with Onfido for document ID and facial biometrics verification
5
5
services: active-directory-b2c
6
6
author: gargi-sinha
7
-
manager: CelesteDG
7
+
manager: martinco
8
8
ms.reviewer: kengaderdus
9
9
ms.service: active-directory
10
10
ms.workload: identity
11
11
ms.topic: how-to
12
-
ms.date: 08/03/2020
12
+
ms.date: 12/8/2022
13
13
ms.author: gasinh
14
14
ms.subservice: B2C
15
15
---
16
16
17
17
# Tutorial for configuring Onfido with Azure Active Directory B2C
18
18
19
-
In this sample tutorial, we provide guidance on how to integrate Azure AD B2C with [Onfido](https://onfido.com/). Onfido is a document ID and facial biometrics verification app. It allows companies to meet *Know Your Customer* and identity requirements in real time. Onfido uses sophisticated AI-based identity verification, which first verifies a photo ID, then matches it against their facial biometrics. This solution ties a digital identity to their real-world person and provides a safe onboarding experience while reducing fraud.
19
+
In this tutorial, learn how to integrate Azure Active Directory B2C (Azure AD B2C) with [Onfido](https://onfido.com/), a document ID and facial biometrics verification app. Use it to meet *Know Your Customer* and identity requirements. Onfido uses artificial intelligence (AI) technology that verifies identity by matching a photo ID with facial biometrics. The solution connects a digital identity to a person, provides a reliable onboarding experience, and helps reduce fraud.
20
20
21
-
In this sample, we connect Onfido's service in the sign-up or login flow to do identity verification. Informed decisions about which product and service the user can access is made based on Onfido's results.
21
+
In this tutorial, you'll enable the Onfido service to verify identity in the sign-up, or sign-in, flow. Onfido results inform decisions about which products or services the user accesses.
22
22
23
23
## Prerequisites
24
24
25
25
To get started, you'll need:
26
26
27
-
- An Azure AD subscription. If you don't have a subscription, you can get a [free account](https://azure.microsoft.com/free/).
28
-
29
-
-[An Azure AD B2C tenant](./tutorial-create-tenant.md)that is linked to your Azure subscription.
30
-
31
-
- An Onfido [trial account](https://onfido.com/signup/).
27
+
- An Azure AD subscription
28
+
- If you don't have on, you can get an [Azure free account](https://azure.microsoft.com/free/)
29
+
-[An Azure AD B2C tenant](./tutorial-create-tenant.md) linked to your Azure subscription
30
+
- An Onfido trial account
31
+
- Go to onfido.com [Contact us](https://onfido.com/signup/) and fill out the form
32
32
33
33
## Scenario description
34
34
35
35
The Onfido integration includes the following components:
36
36
37
-
- Azure AD B2C tenant – The authorization server, responsible for verifying the user's credentials based on custom policies defined in the tenant. It's also known as the identity provider. It hosts the Onfido client app, which collects the user documents and transmits it to the Onfido API service.
37
+
-**Azure AD B2C tenant** – The authorization server that verifies user credentials based on custom policies defined in the tenant. It's also known as the identity provider (IdP). It hosts the Onfido client app, which collects the user documents and transmits them to the Onfido API service.
38
+
-**Onfido client** – A configurable, JavaScript client document-collection utility deployed in webpages. It checks details such as document size and quality.
39
+
-**Intermediate REST API** – Provides endpoints for the Azure AD B2C tenant to communicate with the Onfido API service. It handles data processing and adheres to security requirements of both.
40
+
-**Onfido API service** – The back-end service, which saves and verifies user documents.
38
41
39
-
- Onfido client – A configurable JavaScript client document collection utility deployed within other webpages. Collects the documents and does preliminary checks like document size and quality.
42
+
The following architecture diagram shows the implementation.
40
43
41
-
- Intermediate REST API – Provides endpoints for the Azure AD B2C tenant to communicate with the Onfido API service, handling data processing and adhering to the security requirements of both.
- Onfido API service – The backend service provided by Onfido, which saves and verifies the documents provided by the user.
44
46
45
-
The following architecture diagram shows the implementation.
47
+
1. User signs up to create a new account and enters attributes. Azure AD B2C collects the attributes. Onfido client app hosted in Azure AD B2C checks for the user information.
48
+
2. Azure AD B2C calls the middle layer API and passes the attributes.
49
+
3. Middle layer API collects attributes and converts them to an Onfido API format.
50
+
4. Onfido processes attributes to validate user identification and sends result to the middle layer API.
51
+
5. Middle layer API processes the results and sends relevant information to Azure AD B2C, in JavaScript Object Notation (JSON) format.
52
+
6. Azure AD B2C receives the information. If the response fails, an error message appears. If the response succeeds, the user is authenticated and written into the directory.
46
53
47
-

54
+
## Create an Onfido account
48
55
49
-
|Step | Description |
50
-
|:-----| :-----------|
51
-
| 1. | User arrives at a login page. User signs-up to create a new account and enters information into the page. Azure AD B2C collects the user attributes. Onfido client app hosted in Azure AD B2C does preliminary checks for the user information.
52
-
| 2. | Azure AD B2C calls the middle layer API and passes on the user attributes.
53
-
| 3. | Middle layer API collects user attributes and transforms it into a format that Onfido API could consume. Then, sends it to Onfido.
54
-
| 4. | Onfido consumes the information and processes it to validate user identification. Then, it returns the result to the middle layer API.
55
-
| 5. | Middle layer API processes the information and sends back relevant information in the correct JSON format to Azure AD B2C.
56
-
| 6. | Azure AD B2C receives information back from middle layer API. If it shows a Failure response, an error message is displayed to user. If it shows a Success response, the user is authenticated and written into the directory.
56
+
1. Create an Onfido account: go to onfido.com [Contact us](https://onfido.com/signup/) and fill out the form.
57
+
2. Create an API key: go to [Get started (API v3.5)](https://documentation.onfido.com/).
57
58
58
-
## Onboard with Onfido
59
+
>[!NOTE]
60
+
> You'll need the key later.
59
61
60
-
1. To create an Onfido account, contact [Onfido](https://onfido.com/signup/).
62
+
### Onfido documentation
61
63
62
-
2. Once an account is created, create an [API key](https://documentation.onfido.com/). Live keys are billable, however, you can use the [sandbox keys for testing](https://documentation.onfido.com/?javascript#sandbox-and-live-differences) the solution. The sandbox keys produce the same result structure as live keys, however, the results are always predetermined. Documents aren't processed or saved.
64
+
Live keys are billable, however, you can use the sandbox keys for testing. Go to onfido.com for, [Sandbox and live differences](https://documentation.onfido.com/?javascript#sandbox-and-live-differences). The sandbox keys produce the same result structure as live keys, however, results are predetermined. Documents aren't processed or saved.
63
65
64
-
>[!NOTE]
65
-
> You will need the key later.
66
+
For more Onfido documentation, see:
66
67
67
-
For more information about Onfido, see [Onfido API documentation](https://documentation.onfido.com) and [Onfido Developer Hub](https://developers.onfido.com).
68
+
*[Onfido API documentation](https://documentation.onfido.com)
- Deploy the provided [API code](https://github.com/azure-ad-b2c/partner-integrations/tree/master/samples/OnFido-Combined/API/Onfido.Api) to an Azure service. The code can be published from Visual Studio, following these [instructions](/visualstudio/deployment/quickstart-deploy-to-azure).
74
-
- Set-up CORS, add **Allowed Origin** as https://{your_tenant_name}.b2clogin.com
75
+
1. Deploy the API code to an Azure service. Go to [samples/OnFido-Combined/API/Onfido.Api/](https://github.com/azure-ad-b2c/partner-integrations/tree/master/samples/OnFido-Combined/API/Onfido.Api). You can publish the code from Visual Studio.
76
+
2. Set up cross-origin resource sharing (CORS).
77
+
3. Add **Allowed Origin** as `https://{your_tenant_name}.b2clogin.com`.
75
78
76
79
>[!NOTE]
77
-
>You'll need the URL of the deployed service to configure Azure AD with the required settings.
80
+
>You'll need the deployed service URL to configure Azure AD.
78
81
79
82
#### Adding sensitive configuration settings
80
83
81
-
Application settings can be configured in the [App service in Azure](../app-service/configure-common.md#configure-app-settings). The App service allows for settings to be securely configured without checking them into a repository. The REST API needs the following settings:
84
+
[Configure app settings](../app-service/configure-common.md#configure-app-settings) in the Azure App service without checking them into a repository.
1. Set up a [blob storage container in your storage account](../storage/blobs/storage-quickstart-blobs-portal.md#create-a-container)
92
-
93
-
2. Store the UI files from the [UI folder](https://github.com/azure-ad-b2c/partner-integrations/tree/master/samples/OnFido-Combined/UI) to your blob container.
94
-
95
-
3. Allow CORS access to storage container you created by following these instructions:
96
-
97
-
a. Go to **Settings** >**Allowed Origin**, enter `https://{your_tenant_name}.b2clogin.com`. Replace your-tenant-name with the name of your Azure AD B2C tenant. For example, https://fabrikam.b2clogin.com. Use all lowercase letters when entering your tenant name.
98
-
99
-
b. For **Allowed Methods**, select `GET` and `PUT`.
93
+
#### Configure your storage location
100
94
101
-
c. Select **Save**.
95
+
1. In the Azure portal, [create a container](../storage/blobs/storage-quickstart-blobs-portal.md#create-a-container).
96
+
2. Store the UI files in [/samples/OnFido-Combined/UI](https://github.com/azure-ad-b2c/partner-integrations/tree/master/samples/OnFido-Combined/UI), in your blob container.
97
+
3. Allow CORS access to the storage container you created: Go to **Settings** >**Allowed Origin**.
98
+
4. Enter `https://{your_tenant_name}.b2clogin.com`.
99
+
5. Replace your tenant name with your Azure AD B2C tenant name, using lower-case letters. For example, `https://fabrikam.b2clogin.com`.
100
+
6. For **Allowed Methods**, select `GET` and `PUT`.
101
+
7. Select **Save**.
102
102
103
103
#### Update UI files
104
104
105
-
1. In the UI files, go to the folder [**ocean_blue**](https://github.com/azure-ad-b2c/partner-integrations/tree/master/samples/OnFido-Combined/UI/ocean_blue)
106
-
105
+
1. In the UI files, go to [samples/OnFido-Combined/UI/ocean_blue](https://github.com/azure-ad-b2c/partner-integrations/tree/master/samples/OnFido-Combined/UI/ocean_blue).
107
106
2. Open each html file.
108
-
109
-
3. Find and replace `{your-ui-blob-container-url}` with the URL of where your UI **ocean_blue**, **dist**, and **assets** folders are located
110
-
111
-
4. Find and replace `{your-intermediate-api-url}` with the URL of the intermediate API app service.
107
+
3. Find `{your-ui-blob-container-url}`, and replace it with your UI **ocean_blue**, **dist**, and **assets** folder URLs.
108
+
4. Find `{your-intermediate-api-url}`, and replace it with the intermediate API app service URL.
112
109
113
110
#### Upload your files
114
111
115
-
1. Store the UI files from the UI folder to your blob container.
116
-
117
-
2. Use [Azure Storage Explorer](../virtual-machines/disks-use-storage-explorer-managed-disks.md) to manage your files and access permissions.
112
+
1. Store the UI folder files in your blob container.
113
+
2.[Use Azure Storage Explorer to manage Azure managed disks](../virtual-machines/disks-use-storage-explorer-managed-disks.md) and access permissions.
118
114
119
-
### Part 3 - Configure Azure AD B2C
115
+
### Configure Azure AD B2C
120
116
121
117
#### Replace the configuration values
122
118
123
-
In the provided [custom policies](https://github.com/azure-ad-b2c/partner-integrations/tree/master/samples/OnFido-Combined/Policies), find the following placeholders and replace with the corresponding values from your instance.
119
+
In [/samples/OnFido-Combined/Policies](https://github.com/azure-ad-b2c/partner-integrations/tree/master/samples/OnFido-Combined/Policies), find the following placeholders and replace them with the corresponding values from your instance.
|{your_tenant_name}|Your tenant short name| "yourtenant" from yourtenant.onmicrosoft.com|
128
-
|{your_tenantID}| TenantID of your Azure AD B2C tenant | 01234567-89ab-cdef-0123-456789abcdef|
129
-
|{your_tenant_IdentityExperienceFramework_appid}|App ID of the IdentityExperienceFramework app configured in your Azure AD B2C tenant|01234567-89ab-cdef-0123-456789abcdef|
130
-
|{your_tenant_ProxyIdentityExperienceFramework _appid} |App ID of the ProxyIdentityExperienceFramework app configured in your Azure AD B2C tenant| 01234567-89ab-cdef-0123-456789abcdef|
131
-
|{your_tenant_extensions_appid}| App ID of your tenant's storage application | 01234567-89ab-cdef-0123-456789abcdef|
132
-
|{your_tenant_extensions_app_objectid}| Object ID of your tenant's storage application | 01234567-89ab-cdef-0123-456789abcdef|
133
-
|{your_app_insights_instrumentation_key}| Instrumentation key of your app insights instance*|01234567-89ab-cdef-0123-456789abcdef|
134
-
|{your_ui_file_base_url}| URL of the location where your UI **ocean_blue**, **dist**, and **assets** folders are located |https://yourstorage.blob.core.windows.net/UI/|
135
-
|{your_app_service_URL}| URL of the app service you've set up|`https://yourapp.azurewebsites.net`|
121
+
|Placeholder|Replace with value|Example|
122
+
|---|---|---|
123
+
|{your_tenant_name}|Your tenant short name|"your tenant" from yourtenant.onmicrosoft.com|
124
+
|{your_tenantID}|Your Azure AD B2C TenantID| 01234567-89ab-cdef-0123-456789abcdef|
125
+
|{your_tenant_IdentityExperienceFramework_appid}|IdentityExperienceFramework app App ID configured in your Azure AD B2C tenant|01234567-89ab-cdef-0123-456789abcdef|
126
+
|{your_tenant_ProxyIdentityExperienceFramework_appid}|ProxyIdentityExperienceFramework app App ID configured in your Azure AD B2C tenant| 01234567-89ab-cdef-0123-456789abcdef|
|{your_ui_file_base_url}|Location URL of your UI folders **ocean_blue**, **dist**, and **assets**|`https://yourstorage.blob.core.windows.net/UI/`|
131
+
|{your_app_service_URL}|The app service URL you set up|`https://yourapp.azurewebsites.net`|
136
132
137
-
*App insights can be in a different tenant. This step is optional. Remove the corresponding TechnicalProfiles and OrchestrationSteps if not needed.
133
+
*App insights can be in a different tenant. This step is optional. Remove the corresponding TechnicalProfiles and OrchestrationSteps, if they're not needed.
138
134
139
-
### Part 4 - Configure the Azure AD B2C policy
135
+
### Configure Azure AD B2C policy
140
136
141
-
Refer to this [document](tutorial-create-user-flows.md?pivots=b2c-custom-policy#custom-policy-starter-pack) for instructions on how to set up your Azure AD B2C tenant and configure policies.
137
+
See, [Custom policy starter pack](tutorial-create-user-flows.md?pivots=b2c-custom-policy#custom-policy-starter-pack) for instructions to set up your Azure AD B2C tenant and configure policies. Custom policies are a set of XML files you upload to your Azure AD B2C tenant to define technical profiles and user journeys.
142
138
143
139
>[!NOTE]
144
-
>As a best practice, we recommend that customers add consent notification in the attribute collection page. Notify users that information will be send to third-party services for Identity verification.
140
+
>We recommend you add consent notification on the attribute collection page. Notify users that information goes to third-party services for identity verification.
145
141
146
142
## Test the user flow
147
143
148
-
1. Open the Azure AD B2C tenant and under Policies select **Identity Experience Framework**.
149
-
150
-
2. Select your previously created **SignUpSignIn**.
151
-
152
-
3. Select **Run user flow** and select the settings:
153
-
154
-
a. **Application**: select the registered app (sample is JWT)
144
+
1. Open the Azure AD B2C tenant.
145
+
2. Under **Policies** select **Identity Experience Framework**.
146
+
3. Select your previously created **SignUpSignIn**.
147
+
4. Select **Run user flow**.
148
+
5. For **Application**, select the registered app (example is JWT).
149
+
6. For **Reply URL**, select the **redirect URL**.
150
+
7. Select **Run user flow**.
151
+
8. Complete the sign-up flow.
152
+
9. Create an account.
153
+
10. When the user attribute is created, Onfido is called during the flow.
155
154
156
-
b. **Reply URL**: select the **redirect URL**
157
-
158
-
c. Select **Run user flow**.
159
-
160
-
4. Go through sign-up flow and create an account
161
-
162
-
5. Onfido service will be called during the flow, after user attribute is created. If the flow is incomplete, check that user isn't saved in the directory.
155
+
>[!NOTE]
156
+
>If the flow is incomplete, confirm the user is saved in the directory.
163
157
164
158
## Next steps
165
159
166
-
For additional information, review the following articles:
167
-
168
160
-[Custom policies in Azure AD B2C](./custom-policy-overview.md)
169
-
170
161
-[Get started with custom policies in Azure AD B2C](tutorial-create-user-flows.md?pivots=b2c-custom-policy)
0 commit comments