Language

MsalException.AuthenticationResultMetadata Property

Definition

Diagnostic metadata for the failed token-acquisition attempt — the total duration and, when the relevant stage ran, HTTP/cache durations, token endpoint, and region used. This is null when the exception was thrown before the request pipeline started collecting metadata (for example, parameter or builder validation). When it is non-null — the typical in-request failure — DurationTotalInMs is always populated (useful for latency measurement), while the other fields may be 0/null when the corresponding stage did not run. On a failure TokenSource has no meaningful value and should not be relied on. Reuses the type returned by AuthenticationResultMetadata on the success path.

public Microsoft.Identity.Client.AuthenticationResultMetadata AuthenticationResultMetadata { get; }
member this.AuthenticationResultMetadata : Microsoft.Identity.Client.AuthenticationResultMetadata
Public ReadOnly Property AuthenticationResultMetadata As AuthenticationResultMetadata

Property Value

Remarks

Populated in-process after the request completes; it is intentionally not part of the exception's JSON serialization, so it is not preserved if the exception is marshaled across a process boundary.

Applies to