MsalServiceException Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Exception type thrown when service returns an error response or other networking errors occur. For more details, see https://aka.ms/msal-net-exceptions
public class MsalServiceException : Microsoft.Identity.Client.MsalException
type MsalServiceException = class
inherit MsalException
Public Class MsalServiceException
Inherits MsalException
- Inheritance
- Derived
Constructors
| Name | Description |
|---|---|
| MsalServiceException(String, String, Exception) |
Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. |
| MsalServiceException(String, String, Int32, Exception) |
Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. |
| MsalServiceException(String, String, Int32, String, Exception) |
Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. |
| MsalServiceException(String, String, Int32) |
Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. |
| MsalServiceException(String, String) |
Initializes a new instance of the exception class with a specified error code, error message and a reference to the inner exception that is the cause of this exception. |
Fields
| Name | Description |
|---|---|
| AuthenticationResultMetadataKey |
A key on Data under which MSAL stores the AuthenticationResultMetadata captured when a token acquisition fails with a non-MsalException. Lets downstream consumers surface token-acquisition diagnostics even though the originating exception is re-thrown unchanged. (Inherited from MsalException) |
| BrokerErrorCode |
An AdditionalExceptionData property key, available when using desktop brokers. (Inherited from MsalException) |
| BrokerErrorContext |
An AdditionalExceptionData property key, available when using desktop brokers. (Inherited from MsalException) |
| BrokerErrorStatus |
An AdditionalExceptionData property key, available when using desktop brokers. (Inherited from MsalException) |
| BrokerErrorTag |
An AdditionalExceptionData property key, available when using desktop brokers. (Inherited from MsalException) |
| BrokerTelemetry |
An AdditionalExceptionData property key, available when using desktop brokers. (Inherited from MsalException) |
| ManagedIdentitySource |
An AdditionalExceptionData property key, available when using managed identity. (Inherited from MsalException) |
Properties
| Name | Description |
|---|---|
| AdditionalExceptionData |
A property bag with extra details for this exception. (Inherited from MsalException) |
| AuthenticationResultMetadata |
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
|
| Claims |
Additional claims requested by the service. When this property is not null or empty, this means that the service requires the user to provide additional claims, such as doing two factor authentication. The are two cases:
|
| CorrelationId |
An ID that can used to piece up a single authentication flow. (Inherited from MsalException) |
| ErrorCode |
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. (Inherited from MsalException) |
| ErrorCodesForLogging |
The list of STS-specific error codes returned by the token service (for example the
numeric |
| Headers |
Contains the HTTP headers from the server response that indicated an error. |
| IsRetryable |
Indicates if the previous operation that resulted in this exception should be retried. (Inherited from MsalException) |
| ResponseBody |
Raw response body received from the server. |
| StatusCode |
Gets the status code returned from HTTP layer. This status code is either the |
| SubErrorForLogging |
Sub-error returned by the token service refining ErrorCode
(for example |
Methods
| Name | Description |
|---|---|
| ToJsonString() |
Allows serialization of most values of the exception into JSON. (Inherited from MsalException) |
| ToString() |
Creates and returns a string representation of the current exception. |
| UpdateIsRetryable() |
As per discussion with Evo, AAD |