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/active-directory-b2c-troubleshoot-custom.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,29 +15,27 @@ ms.subservice: B2C
15
15
16
16
# Collect Azure Active Directory B2C logs with Application Insights
17
17
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.
19
19
20
20
The detailed activity logs described here should be enabled **ONLY** during the development of your custom policies.
21
21
22
22
> [!WARNING]
23
23
> 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**.
24
24
25
-
## Use Application Insights
25
+
## Set up Application Insights
26
26
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.
30
28
31
29
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).
33
31
1. Select **Create a resource** in the left-hand navigation menu.
34
32
1. Search for and select **Application Insights**, then select **Create**.
35
33
1. Complete the form, select **Review + create**, and then select **Create**.
36
34
1. Once the deployment has been completed, select **Go to resource**.
37
35
1. Under **Configure** in Application Insights menu, select **Properties**.
38
36
1. Record the **INSTRUMENTATION KEY** for use in a later step.
39
37
40
-
###Configure the custom policy
38
+
## Configure the custom policy
41
39
42
40
1. Open the relying party (RP) file, for example *SignUpOrSignin.xml*.
43
41
1. Add the following attributes to the `<TrustFrameworkPolicy>` element:
@@ -80,31 +78,31 @@ Application Insights provides a way to diagnose exceptions and visualize applica
80
78
81
79
1. Upload the policy.
82
80
83
-
###See the logs in Application Insights
81
+
## See the logs in Application Insights
84
82
85
83
There is a short delay, typically less than five minutes, before you can see new logs in Application Insights.
86
84
87
85
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**.
89
87
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:
91
90
92
91
| Query | Description |
93
92
|---------------------|--------------------|
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
96
95
97
96
The entries may be long. Export to CSV for a closer look.
98
97
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).
100
99
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
103
101
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.
105
103
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.
107
105
108
-
## Next Steps
106
+
You can find the version of the viewer that reads events from Application Insights on GitHub, here:
109
107
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.
0 commit comments