<PackageReference Include="Azure.Identity" Version="1.17.2" />

Azure.Identity.TokenCredentialDiagnosticsOptions

public class TokenCredentialDiagnosticsOptions : DiagnosticsOptions
Exposes client options related to logging, telemetry, and distributed tracing.
public bool IsAccountIdentifierLoggingEnabled { get; set; }

If true, we try to log the account identifiers by parsing the received access token. The account identifiers we try to log are: The Application or Client IdentifierUser Principal NameTenant IdentifierObject Identifier of the authenticated user or application