Skip to content

Commit 5cfd659

Browse files
committed
Environtment variable info
1 parent 483c3c0 commit 5cfd659

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,31 @@ The following example shows how to configure the Java agent to use a service pri
204204

205205
:::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":::
206206

207-
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../../includes/azure-monitor-instrumentation-key-deprecation.md)]
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.
208232

209233
### [Python](#tab/python)
210234

0 commit comments

Comments
 (0)