Skip to content

Commit 9e2290f

Browse files
committed
structure
1 parent 0efe38c commit 9e2290f

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

articles/active-directory-b2c/active-directory-b2c-troubleshoot-custom.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,27 @@ ms.subservice: B2C
1515

1616
# Collect Azure Active Directory B2C logs with Application Insights
1717

18-
This article provides steps for collecting logs from Active Directory B2C (Azure AD B2C) so that you can diagnose problems with your custom policies.
18+
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.
1919

2020
The detailed activity logs described here should be enabled **ONLY** during the development of your custom policies.
2121

2222
> [!WARNING]
2323
> Do not enable development mode in production. Logs collect all claims sent to and from identity providers. You as the developer assume responsibility for any personal data collected in your Application Insights logs. These detailed logs are collected only when the policy is placed in **DEVELOPER MODE**.
2424
25-
## Use Application Insights
25+
## Set up Application Insights
2626

27-
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.
28-
29-
### Set up Application Insights
27+
If you don't already have one, create an instance of Application Insights in your subscription.
3028

3129
1. Sign in to the [Azure portal](https://portal.azure.com).
32-
1. Select the **Directory + subscription** filter in the top menu, and then select the directory that contains your Azure subscription (not the Azure AD B2C tenant).
30+
1. Select the **Directory + subscription** filter in the top menu, and then select the directory that contains your Azure subscription (not your Azure AD B2C directory).
3331
1. Select **Create a resource** in the left-hand navigation menu.
3432
1. Search for and select **Application Insights**, then select **Create**.
3533
1. Complete the form, select **Review + create**, and then select **Create**.
3634
1. Once the deployment has been completed, select **Go to resource**.
3735
1. Under **Configure** in Application Insights menu, select **Properties**.
3836
1. Record the **INSTRUMENTATION KEY** for use in a later step.
3937

40-
### Configure the custom policy
38+
## Configure the custom policy
4139

4240
1. Open the relying party (RP) file, for example *SignUpOrSignin.xml*.
4341
1. Add the following attributes to the `<TrustFrameworkPolicy>` element:
@@ -80,31 +78,31 @@ Application Insights provides a way to diagnose exceptions and visualize applica
8078

8179
1. Upload the policy.
8280

83-
### See the logs in Application Insights
81+
## See the logs in Application Insights
8482

8583
There is a short delay, typically less than five minutes, before you can see new logs in Application Insights.
8684

8785
1. Open the Application Insights resource that you created in the [Azure portal](https://portal.azure.com).
88-
1. In the **Overview** menu, . on **Analytics**.
86+
1. In the **Overview** menu, select **Analytics**.
8987
1. Open a new tab in Application Insights.
90-
1. Here is a list of queries you can use to see the logs
88+
89+
Here is a list of queries you can use to see the logs:
9190

9291
| Query | Description |
9392
|---------------------|--------------------|
94-
traces | See all of the logs generated by Azure AD B2C |
95-
traces \| where timestamp > ago(1d) | See all of the logs generated by Azure AD B2C for the last day
93+
`traces` | See all of the logs generated by Azure AD B2C |
94+
`traces | where timestamp > ago(1d)` | See all of the logs generated by Azure AD B2C for the last day
9695

9796
The entries may be long. Export to CSV for a closer look.
9897

99-
You can learn more about the Analytics tool [here](https://docs.microsoft.com/azure/application-insights/app-insights-analytics).
98+
For more information about querying, see [Overview of log queries in Azure Monitor](../azure-monitor/log-query/log-query-overview).
10099

101-
>[!NOTE]
102-
>The community has developed a user journey viewer to help identity developers. It is not supported by Microsoft and made available strictly as-is. It reads from your Application Insights instance and provides a well-structured view of the user journey events. You obtain the source code and deploy it in your own solution.
100+
## Next steps
103101

104-
The version of the viewer that reads events from Application Insights is located [here](https://github.com/Azure-Samples/active-directory-b2c-advanced-policies/tree/master/wingtipgamesb2c/src/WingTipUserJourneyPlayerWebApplication)
102+
The community has developed a user journey viewer to help identity developers. It reads from your Application Insights instance and provides a well-structured view of the user journey events. You obtain the source code and deploy it in your own solution.
105103

106-
[GitHub Repository for Unsupported Custom Policy Samples and Related tools](https://github.com/Azure-Samples/active-directory-b2c-advanced-policies)
104+
The user journey player is not supported by Microsoft, and is made available strictly as-is.
107105

108-
## Next Steps
106+
You can find the version of the viewer that reads events from Application Insights on GitHub, here:
109107

110-
Explore the data in Application Insights to help you understand how the Identity Experience Framework underlying B2C works to deliver your own identity experiences.
108+
[Azure-Samples/active-directory-b2c-advanced-policies](https://github.com/Azure-Samples/active-directory-b2c-advanced-policies/tree/master/wingtipgamesb2c/src/WingTipUserJourneyPlayerWebApplication)

0 commit comments

Comments
 (0)