SetAuthenticatedUserContext is not recognized in ASP.NET Core backend

The setAuthenticatedUserContext API has optional parameters. When setting storeInCookie to true, the ai_authuser cookie is set, so every request is sent with the authenticatedUserId.

But when using appInsights.setAuthenticatedUserContext(userName, null, true) the back-end side in ASP.NET Core doesn't set the Auth Id context property with the default initializers (in this case the AuthenticatedUserIdTelemetryInitializer).

Some additional discussion can be found at Add option EnableAuthenticationTracking to add AuthenticatedUserId to telemetries · Issue #1431 · microsoft/ApplicationInsights-dotnet · GitHub

Comments

Leave a Comment

All fields are required. Your email address will not be published.