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
After the Microsoft Entra authentication is enabled, you can choose to disable local authentication. This configuration allows you to ingest telemetry authenticated exclusively by Microsoft Entra ID and affects data access (for example, through API keys).
248
-
249
-
You can disable local authentication by using the Azure portal or Azure Policy or programmatically.
250
-
251
-
### Azure portal
252
-
253
-
1. From your Application Insights resource, select **Properties** under **Configure** in the menu on the left. Select **Enabled (click to change)** if the local authentication is enabled.
254
-
255
-
:::image type="content" source="./media/azure-ad-authentication/enabled.png" alt-text="Screenshot that shows Properties under the Configure section and the Enabled (select to change) local authentication button.":::
256
-
257
-
1. Select **Disabled** and apply changes.
258
-
259
-
:::image type="content" source="./media/azure-ad-authentication/disable.png" alt-text="Screenshot that shows local authentication with the Enabled/Disabled button.":::
260
-
261
-
1. After disabling local authentication on your resource, you'll see the corresponding information in the **Overview** pane.
262
-
263
-
:::image type="content" source="./media/azure-ad-authentication/overview.png" alt-text="Screenshot that shows the Overview tab with the Disabled (select to change) local authentication button.":::
264
-
265
-
### Azure Policy
266
-
267
-
Azure Policy for `DisableLocalAuth` denies users the ability to create a new Application Insights resource without this property set to `true`. The policy name is `Application Insights components should block non-AAD auth ingestion`.
268
-
269
-
To apply this policy definition to your subscription, [create a new policy assignment and assign the policy](../../governance/policy/assign-policy-portal.md).
270
-
271
-
The following example shows the policy template definition:
272
-
273
-
```JSON
274
-
{
275
-
"properties": {
276
-
"displayName": "Application Insights components should block non-AAD auth ingestion",
277
-
"policyType": "BuiltIn",
278
-
"mode": "Indexed",
279
-
"description": "Improve Application Insights security by disabling log ingestion that are not AAD-based.",
280
-
"metadata": {
281
-
"version": "1.0.0",
282
-
"category": "Monitoring"
283
-
},
284
-
"parameters": {
285
-
"effect": {
286
-
"type": "String",
287
-
"metadata": {
288
-
"displayName": "Effect",
289
-
"description": "The effect determines what happens when the policy rule is evaluated to match"
The property `DisableLocalAuth` is used to disable any local authentication on your Application Insights resource. When this property is set to `true`, it enforces that Microsoft Entra authentication must be used for all access.
323
-
324
-
The following example shows the Azure Resource Manager template you can use to create a workspace-based Application Insights resource with `LocalAuth` disabled.
When developing a custom client to obtain an access token from Microsoft Entra ID for submitting telemetry to Application Insights, refer to the following table to determine the appropriate audience string for your particular host environment.
378
-
379
-
| Azure cloud version | Token audience value |
380
-
| --- | --- |
381
-
| Azure public cloud |`https://monitor.azure.com`|
382
-
| Microsoft Azure operated by 21Vianet cloud |`https://monitor.azure.cn`|
383
-
| Azure US Government cloud |`https://monitor.azure.us`|
384
-
385
-
If you're using sovereign clouds, you can find the audience information in the connection string as well. The connection string follows this structure:
The audience parameter, AADAudience, can vary depending on your specific environment.
390
-
391
245
## Query Application Insights using Microsoft Entra authentication
392
246
393
247
You can submit a query request by using the Azure Monitor Application Insights endpoint `https://api.applicationinsights.io`. To access the endpoint, you must authenticate through Microsoft Entra ID.
@@ -825,6 +679,152 @@ A successful request produces a redirect to your redirect URI with the token in
825
679
826
680
This access\_token serves as the `Authorization: Bearer` header value when it passes to the Application Insights API to authorize requests.
827
681
682
+
## Disable local authentication
683
+
684
+
After the Microsoft Entra authentication is enabled, you can choose to disable local authentication. This configuration allows you to ingest telemetry authenticated exclusively by Microsoft Entra ID and affects data access (for example, through API keys).
685
+
686
+
You can disable local authentication by using the Azure portal or Azure Policy or programmatically.
687
+
688
+
### Azure portal
689
+
690
+
1. From your Application Insights resource, select **Properties** under **Configure** in the menu on the left. Select **Enabled (click to change)** if the local authentication is enabled.
691
+
692
+
:::image type="content" source="./media/azure-ad-authentication/enabled.png" alt-text="Screenshot that shows Properties under the Configure section and the Enabled (select to change) local authentication button.":::
693
+
694
+
1. Select **Disabled** and apply changes.
695
+
696
+
:::image type="content" source="./media/azure-ad-authentication/disable.png" alt-text="Screenshot that shows local authentication with the Enabled/Disabled button.":::
697
+
698
+
1. After disabling local authentication on your resource, you'll see the corresponding information in the **Overview** pane.
699
+
700
+
:::image type="content" source="./media/azure-ad-authentication/overview.png" alt-text="Screenshot that shows the Overview tab with the Disabled (select to change) local authentication button.":::
701
+
702
+
### Azure Policy
703
+
704
+
Azure Policy for `DisableLocalAuth` denies users the ability to create a new Application Insights resource without this property set to `true`. The policy name is `Application Insights components should block non-AAD auth ingestion`.
705
+
706
+
To apply this policy definition to your subscription, [create a new policy assignment and assign the policy](../../governance/policy/assign-policy-portal.md).
707
+
708
+
The following example shows the policy template definition:
709
+
710
+
```JSON
711
+
{
712
+
"properties": {
713
+
"displayName": "Application Insights components should block non-AAD auth ingestion",
714
+
"policyType": "BuiltIn",
715
+
"mode": "Indexed",
716
+
"description": "Improve Application Insights security by disabling log ingestion that are not AAD-based.",
717
+
"metadata": {
718
+
"version": "1.0.0",
719
+
"category": "Monitoring"
720
+
},
721
+
"parameters": {
722
+
"effect": {
723
+
"type": "String",
724
+
"metadata": {
725
+
"displayName": "Effect",
726
+
"description": "The effect determines what happens when the policy rule is evaluated to match"
The property `DisableLocalAuth` is used to disable any local authentication on your Application Insights resource. When this property is set to `true`, it enforces that Microsoft Entra authentication must be used for all access.
760
+
761
+
The following example shows the Azure Resource Manager template you can use to create a workspace-based Application Insights resource with `LocalAuth` disabled.
When developing a custom client to obtain an access token from Microsoft Entra ID for submitting telemetry to Application Insights, refer to the following table to determine the appropriate audience string for your particular host environment.
815
+
816
+
| Azure cloud version | Token audience value |
817
+
| --- | --- |
818
+
| Azure public cloud |`https://monitor.azure.com`|
819
+
| Microsoft Azure operated by 21Vianet cloud |`https://monitor.azure.cn`|
820
+
| Azure US Government cloud |`https://monitor.azure.us`|
821
+
822
+
If you're using sovereign clouds, you can find the audience information in the connection string as well. The connection string follows this structure:
0 commit comments