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/azure-monitor/app/azure-ad-authentication.md
-75Lines changed: 0 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,6 @@ The following SDKs and features are unsupported for use with Microsoft Entra aut
37
37
Microsoft Entra authentication is only available for Application Insights Java Agent greater than or equal to 3.2.0.
38
38
-[ApplicationInsights JavaScript web SDK](javascript.md).
39
39
-[Application Insights OpenCensus Python SDK](/previous-versions/azure/azure-monitor/app/opencensus-python) with Python version 3.4 and 3.5.
40
-
-[Certificate/secret-based Microsoft Entra ID](../../active-directory/authentication/active-directory-certificate-based-authentication-get-started.md) isn't recommended for production. Use managed identities instead.
41
40
- On-by-default [autoinstrumentation/codeless monitoring](codeless-overview.md) (for languages) for Azure App Service, Azure Virtual Machines/Azure Virtual Machine Scale Sets, and Azure Functions.
42
41
-[Profiler](profiler-overview.md).
43
42
@@ -75,8 +74,6 @@ Application Insights .NET SDK supports the credential classes provided by [Azure
75
74
- We recommend `ManagedIdentityCredential` for system-assigned and user-assigned managed identities.
76
75
- For system-assigned, use the default constructor without parameters.
77
76
- For user-assigned, provide the client ID to the constructor.
78
-
- We recommend `ClientSecretCredential` for service principals.
79
-
- Provide the tenant ID, client ID, and client secret to the constructor.
80
77
81
78
The following example shows how to manually create and configure `TelemetryConfiguration` by using .NET:
@@ -181,27 +162,6 @@ The following example shows how to configure the Java agent to use user-assigned
181
162
182
163
:::image type="content" source="media/azure-ad-authentication/user-assigned-managed-identity.png" alt-text="Screenshot that shows user-assigned managed identity." lightbox="media/azure-ad-authentication/user-assigned-managed-identity.png":::
183
164
184
-
#### Client secret
185
-
186
-
The following example shows how to configure the Java agent to use a service principal for authentication with Microsoft Entra ID. We recommend using this type of authentication only during development. The ultimate goal of adding the authentication feature is to eliminate secrets.
187
-
188
-
```JSON
189
-
{
190
-
"connectionString": "App Insights Connection String with IngestionEndpoint",
191
-
"authentication": {
192
-
"enabled": true,
193
-
"type": "CLIENTSECRET",
194
-
"clientId":"<YOUR CLIENT ID>",
195
-
"clientSecret":"<YOUR CLIENT SECRET>",
196
-
"tenantId":"<YOUR TENANT ID>"
197
-
}
198
-
}
199
-
```
200
-
201
-
:::image type="content" source="media/azure-ad-authentication/client-secret-tenant-id.png" alt-text="Screenshot that shows the client secret with the tenant ID and the client ID." lightbox="media/azure-ad-authentication/client-secret-tenant-id.png":::
202
-
203
-
:::image type="content" source="media/azure-ad-authentication/client-secret-cs.png" alt-text="Screenshot that shows the Client secrets section with the client secret." lightbox="media/azure-ad-authentication/client-secret-cs.png":::
204
-
205
165
#### Environment variable configuration
206
166
207
167
The `APPLICATIONINSIGHTS_AUTHENTICATION_STRING` environment variable lets Application Insights authenticate to Microsoft Entra ID and send telemetry.
@@ -283,27 +243,6 @@ tracer = Tracer(
283
243
284
244
```
285
245
286
-
#### Client secret
287
-
288
-
```python
289
-
from azure.identity import ClientSecretCredential
290
-
291
-
from opencensus.ext.azure.trace_exporter import AzureExporter
292
-
from opencensus.trace.samplers import ProbabilitySampler
@@ -539,20 +478,6 @@ The root cause might be one of the following reasons:
539
478
- You've created the resource with a system-assigned managed identity or associated a user-assigned identity with it. However, you might have forgotten to add the Monitoring Metrics Publisher role to the resource (if using SAMI) or the user-assigned identity (if using UAMI).
540
479
- You've provided the right credentials to get the access tokens, but the credentials don't belong to the right Application Insights resource. Make sure you see your resource (VM or app service) or user-assigned identity with Monitoring Metrics Publisher roles in your Application Insights resource.
541
480
542
-
#### Invalid Tenant ID
543
-
544
-
If the following exception is seen in the log file `com.microsoft.aad.msal4j.MsalServiceException: Specified tenant identifier <TENANT-ID> is neither a valid DNS name, nor a valid external domain.`, it indicates the agent wasn't successful in acquiring the access token. The probable reason is that you've provided an invalid or the wrong `tenantId` in your client secret configuration.
545
-
546
-
#### Invalid client secret
547
-
548
-
If the following exception is seen in the log file `com.microsoft.aad.msal4j.MsalServiceException: Invalid client secret is provided`, it indicates the agent wasn't successful in acquiring the access token. The probable reason is that you've provided an invalid client secret in your client secret configuration.
549
-
550
-
#### Invalid Client ID
551
-
552
-
If the following exception is seen in the log file `com.microsoft.aad.msal4j.MsalServiceException: Application with identifier <CLIENT_ID> was not found in the directory`, it indicates the agent wasn't successful in acquiring the access token. The probable reason is that you've provided an invalid or the wrong client ID in your client secret configuration
553
-
554
-
If the administrator hasn't installed the application or no user in the tenant has consented to it, this scenario occurs. You may have sent your authentication request to the wrong tenant.
555
-
556
481
### [Python](#tab/python)
557
482
558
483
#### Error starts with "credential error" (with no status code)
0 commit comments