Microsoft.Identity.Client.MsalException
Base exception type thrown when an error occurs during token acquisition.
For more details, see https://aka.ms/msal-net-exceptions
An AdditionalExceptionData property key, available when using desktop brokers.
An AdditionalExceptionData property key, available when using desktop brokers.
An AdditionalExceptionData property key, available when using desktop brokers.
An AdditionalExceptionData property key, available when using desktop brokers.
An AdditionalExceptionData property key, available when using desktop brokers.
An AdditionalExceptionData property key, available when using managed identity.
A property bag with extra details for this exception.
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.
An ID that can used to piece up a single authentication flow.
Gets the protocol error code returned by the service or generated by the client. This is the code you can rely on for
exception handling. Values for this code are typically provided in constant strings in the derived exceptions types
with explanations of mitigation.
Indicates if the previous operation that resulted in this exception should be retried.
public MsalException()
Initializes a new instance of the exception class.
Initializes a new instance of the exception class with a specified
error code.
Initializes a new instance of the exception class with a specified
error code and error message.
Initializes a new instance of the exception class with a specified
error code and a reference to the inner exception that is the cause of
this exception.
Allows re-hydration of the MsalException (or one of its derived types) from JSON generated by ToJsonString().
Allows serialization of most values of the exception into JSON.