Skip to content

Commit 37334dd

Browse files
authored
Merge pull request #174879 from kengaderdus/address-GHI-80234
[identity][Azure AD][B2C] Address GitHub Issue #80234
2 parents 3ae9d3e + c35893f commit 37334dd

File tree

6 files changed

+64
-15
lines changed

6 files changed

+64
-15
lines changed

.openpublishing.redirection.active-directory.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10509,6 +10509,11 @@
1050910509
"source_path": "articles/active-directory/privileged-identity-management/pim-resource-roles-start-access-review.md",
1051010510
"redirect_url": "/azure/active-directory/privileged-identity-management/pim-create-azure-ad-roles-and-resource-roles-review",
1051110511
"redirect_document_id": false
10512-
}
10512+
},
10513+
{
10514+
"source_path_from_root": "/articles/active-directory-b2c/troubleshoot-custom-policies.md",
10515+
"redirect_url": "/azure/active-directory-b2c/troubleshoot",
10516+
"redirect_document_id": false
10517+
}
1051310518
]
1051410519
}

articles/active-directory-b2c/TOC.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,15 +398,13 @@
398398
displayName: rest claims exchange
399399
- name: Secure an API connector
400400
href: secure-rest-api.md
401-
- name: Custom policy
401+
- name: Troubleshooting
402402
items:
403-
- name: Troubleshooting
404-
items:
405-
- name: Collect logs using Application Insights
406-
href: troubleshoot-with-application-insights.md
407-
displayName: troubleshooting, app insights
408-
- name: Troubleshooting custom policies
409-
href: troubleshoot-custom-policies.md
403+
- name: Collect logs using Application Insights
404+
href: troubleshoot-with-application-insights.md
405+
displayName: troubleshooting, app insights
406+
- name: Troubleshooting and error handling
407+
href: troubleshoot.md
410408
- name: UserInfo endpoint
411409
href: userinfo-endpoint.md
412410
- name: Partner integration

articles/active-directory-b2c/add-password-reset-policy.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ Custom policies are a set of XML files that you upload to your Azure AD B2C tena
335335

336336
::: zone-end
337337

338+
## Troubleshoot Azure AD B2C user flows and custom policies
339+
Your application needs to handle certain errors coming from Azure B2C service. Learn [how to troubleshoot Azure AD B2C's user flows and custom policies](troubleshoot.md).
340+
338341
## Next steps
339342

340343
Set up a [force password reset](force-password-reset.md).

articles/active-directory-b2c/troubleshoot-with-application-insights.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,21 @@ ms.date: 09/20/2021
1313
ms.custom: project-no-code
1414
ms.author: mimart
1515
ms.subservice: B2C
16+
zone_pivot_groups: b2c-policy-type
1617
---
1718

1819
# Collect Azure Active Directory B2C logs with Application Insights
1920

21+
[!INCLUDE [active-directory-b2c-choose-user-flow-or-custom-policy](../../includes/active-directory-b2c-choose-user-flow-or-custom-policy.md)]
22+
23+
::: zone pivot="b2c-user-flow"
24+
25+
[!INCLUDE [active-directory-b2c-limited-to-custom-policy](../../includes/active-directory-b2c-limited-to-custom-policy.md)]
26+
27+
::: zone-end
28+
29+
::: zone pivot="b2c-custom-policy"
30+
2031
This article provides steps for collecting logs from Active Directory B2C (Azure AD B2C) so that you can diagnose problems with your custom policies. Application Insights provides a way to diagnose exceptions and visualize application performance issues. Azure AD B2C includes a feature for sending data to Application Insights.
2132

2233
The detailed activity logs described here should be enabled **ONLY** during the development of your custom policies.
@@ -189,4 +200,6 @@ To improve your production environment performance and better user experience, i
189200

190201
## Next steps
191202

192-
- Learn how to [troubleshoot Azure AD B2C custom policies](troubleshoot-custom-policies.md)
203+
- Learn how to [troubleshoot Azure AD B2C custom policies](troubleshoot.md)
204+
205+
::: zone-end

articles/active-directory-b2c/troubleshoot-custom-policies.md renamed to articles/active-directory-b2c/troubleshoot.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Troubleshoot custom policies in Azure Active Directory B2C
2+
title: Troubleshoot custom policies and user flows in Azure Active Directory B2C
33
description: Learn about approaches to solving errors when working with custom policies in Azure Active Directory B2C.
44
services: active-directory-b2c
55
author: msmimart
@@ -8,12 +8,39 @@ manager: celestedg
88
ms.service: active-directory
99
ms.workload: identity
1010
ms.topic: troubleshooting
11-
ms.date: 05/25/2021
11+
ms.date: 10/08/2021
1212
ms.author: mimart
1313
ms.subservice: B2C
14+
zone_pivot_groups: b2c-policy-type
1415
---
1516

16-
# Troubleshoot Azure AD B2C custom policies
17+
# Troubleshoot Azure AD B2C custom policies and user flows
18+
19+
[!INCLUDE [active-directory-b2c-choose-user-flow-or-custom-policy](../../includes/active-directory-b2c-choose-user-flow-or-custom-policy.md)]
20+
21+
Your application needs to handle certain errors coming from Azure B2C service. This article highlights some of the common errors and how to handle them.
22+
23+
::: zone pivot="b2c-user-flow"
24+
25+
## Password reset error
26+
27+
This error occurs when the [self-service password reset experience](add-password-reset-policy.md#self-service-password-reset-recommended) isn't enabled in a user flow. Thus, selecting the **Forgot your password?** link doesn't trigger a password reset user flow. Instead, the error code `AADB2C90118` is returned to your application.
28+
29+
There are 2 solutions to this problem:
30+
- Respond back with a new authentication request using Azure AD B2C password reset user flow.
31+
- Use recommended [self service password resect (SSPR) experience](add-password-reset-policy.md#self-service-password-reset-recommended).
32+
33+
34+
## User canceled the operation
35+
Azure AD B2C service can also return an error to your application when a user cancels an operation. The following are examples of scenarios where a user performs a cancel operation:
36+
- A user policy uses the recommended [self service password resect (SSPR) experience](add-password-reset-policy.md#self-service-password-reset-recommended) with a consumer local account. The user selects the **Forgot your password?** link , and then selects **Cancel** button before the user flow experience completes. In this case, Azure AD B2C service returns error code `AADB2C90091` to your application.
37+
- A user chooses to authenticate with an external identity provider such as [LinkedIn](identity-provider-linkedin.md). The user select **Cancel** button before authenticating to the identity provider itself. In this case, Azure AD B2C service returns error code `AADB2C90273` to your application. Learn more about [error codes Azure Active Directory B2C service return](error-codes.md).
38+
39+
To handle this error, fetch the **error description** for the user and respond back with a new authentication request with the same user flow.
40+
41+
::: zone-end
42+
43+
::: zone pivot="b2c-custom-policy"
1744

1845
If you use Azure Active Directory B2C (Azure AD B2C) [custom policies](custom-policy-overview.md), you might experience challenges with policy language XML format or runtime issues. This article describes some tools and tips that can help you discover and resolve issues.
1946

@@ -383,7 +410,7 @@ The cause for this error is similar to the one for the claim error. Check the pr
383410

384411
### User is currently logged as a user of 'yourtenant.onmicrosoft.com' tenant...
385412

386-
You login with an account from a tenant that is different than the policy you try to upload. For example, you sign-in with [email protected], while your policy `TenantId` is set to `fabrikam.onmicrosoft.com`.
413+
You login with an account from a tenant that is different than the policy you try to upload. For example, your sign-in with [email protected], while your policy `TenantId` is set to `fabrikam.onmicrosoft.com`.
387414

388415
```xml
389416
<TrustFrameworkPolicy ...
@@ -462,6 +489,9 @@ To fix this type of error, when you upload the policy, select the **Overwrite th
462489

463490
![Screenshot that demonstrates how to overwrite the custom policy if it already exists.](./media/troubleshoot-custom-policies/overwrite-custom-policy-if-exists.png)
464491

492+
::: zone-end
493+
494+
465495

466496
## Next steps
467497

articles/active-directory-b2c/user-flow-custom-attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Use the following steps to remove extension/custom attribute from a user flow:
202202
1. On the **Portal settings | Directories + subscriptions** page, find your Azure AD B2C directory in the Directory name list, and then select **Switch**
203203
1. Choose **All services** in the top-left corner of the Azure portal, search for and select **Azure AD B2C**.
204204
1. Select **User attributes**, and then select the attribute you want to delete.
205-
1. Select **Delete**
205+
1. Select **Delete**, and then select **Yes** to confirm.
206206

207207
::: zone-end
208208

0 commit comments

Comments
 (0)