Skip to content

Commit 82d5732

Browse files
Merge pull request #216513 from AnuragSingh-MSFT/patch-13
(AzureCXP) fixes MicrosoftDocs/azure-docs#99582
2 parents 9e99729 + b45cb6c commit 82d5732

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,9 @@ Application Insights .NET SDK supports the credential classes provided by [Azure
7676
Below is an example of manually creating and configuring a `TelemetryConfiguration` using .NET:
7777

7878
```csharp
79-
var config = new TelemetryConfiguration
80-
{
81-
ConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://xxxx.applicationinsights.azure.com/"
82-
}
79+
TelemetryConfiguration.Active.ConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://xxxx.applicationinsights.azure.com/";
8380
var credential = new DefaultAzureCredential();
84-
config.SetAzureTokenCredential(credential);
81+
TelemetryConfiguration.Active.SetAzureTokenCredential(credential);
8582
```
8683

8784
Below is an example of configuring the `TelemetryConfiguration` using .NET Core:

0 commit comments

Comments
 (0)