Skip to content

Commit d63499e

Browse files
committed
Environtment variable info
1 parent 8c7e38f commit d63499e

File tree

1 file changed

+24
-32
lines changed

1 file changed

+24
-32
lines changed

articles/azure-monitor/app/azure-ad-authentication.md

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ services.AddApplicationInsightsTelemetry(new ApplicationInsightsServiceOptions
100100
});
101101
```
102102

103-
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../../includes/azure-monitor-instrumentation-key-deprecation.md)]
104-
105103
### [Node.js](#tab/nodejs)
106104

107105
> [!NOTE]
@@ -137,8 +135,6 @@ appInsights.defaultClient.config.aadTokenCredential = credential;
137135

138136
```
139137

140-
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../../includes/azure-monitor-instrumentation-key-deprecation.md)]
141-
142138
### [Java](#tab/java)
143139

144140
> [!NOTE]
@@ -204,32 +200,6 @@ The following example shows how to configure the Java agent to use a service pri
204200

205201
:::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":::
206202

207-
#### Environment variable configuration
208-
209-
The `APPLICATIONINSIGHTS_AUTHENTICATION_STRING` environment variable specifies the Azure AD authentication string for Azure Application Insights. It lets the Application Insights Java SDK authenticate to Azure AD and send telemetry.
210-
211-
**Example connection string with Azure AD authentication:**
212-
213-
```plaintext
214-
InstrumentationKey=00000000-0000-0000-0000-000000000000;AuthenticationType=AzureAD;
215-
```
216-
217-
Set the `APPLICATIONINSIGHTS_AUTHENTICATION_STRING` environment variable using this string.
218-
219-
**In Unix/Linux:**
220-
221-
```shell
222-
export APPLICATIONINSIGHTS_AUTHENTICATION_STRING="InstrumentationKey=00000000-0000-0000-0000-000000000000;AuthenticationType=AzureAD;"
223-
```
224-
225-
**In Windows:**
226-
227-
```shell
228-
set APPLICATIONINSIGHTS_AUTHENTICATION_STRING="InstrumentationKey=00000000-0000-0000-0000-000000000000;AuthenticationType=AzureAD;"
229-
```
230-
231-
After setting it, restart your Java application. It now sends telemetry to Application Insights using Azure AD authentication.
232-
233203
### [Python](#tab/python)
234204

235205
> [!NOTE]
@@ -297,8 +267,6 @@ tracer = Tracer(
297267
...
298268
```
299269
---
300-
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../../includes/azure-monitor-instrumentation-key-deprecation.md)]
301-
-
302270

303271
## Disable local authentication
304272

@@ -446,6 +414,30 @@ _InstrumentationKey={profile.InstrumentationKey};IngestionEndpoint={ingestionEnd
446414

447415
The audience parameter, AADAudience, may vary depending on your specific environment.
448416

417+
### Environment variable configuration
418+
419+
The `APPLICATIONINSIGHTS_AUTHENTICATION_STRING` environment variable specifies the Azure AD authentication string for Azure Application Insights. It lets Application Insights authenticate to Azure AD and send telemetry.
420+
421+
Example connection string with Azure AD authentication:
422+
423+
`InstrumentationKey=00000000-0000-0000-0000-000000000000;AuthenticationType=AzureAD;`
424+
425+
Set the `APPLICATIONINSIGHTS_AUTHENTICATION_STRING` environment variable using this string.
426+
427+
**In Unix/Linux:**
428+
429+
```shell
430+
export APPLICATIONINSIGHTS_AUTHENTICATION_STRING="InstrumentationKey=00000000-0000-0000-0000-000000000000;AuthenticationType=AzureAD;"
431+
```
432+
433+
**In Windows:**
434+
435+
```shell
436+
set APPLICATIONINSIGHTS_AUTHENTICATION_STRING="InstrumentationKey=00000000-0000-0000-0000-000000000000;AuthenticationType=AzureAD;"
437+
```
438+
439+
After setting it, restart your application. It now sends telemetry to Application Insights using Azure AD authentication.
440+
449441
## Troubleshooting
450442

451443
This section provides distinct troubleshooting scenarios and steps that you can take to resolve an issue before you raise a support ticket.

0 commit comments

Comments
 (0)