MsalServiceException Class

Definition

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
MsalServiceException
Derived

Constructors

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.

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)

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.

Properties

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:

For more details see https://aka.ms/msal-net-claim-challenge

CorrelationId

An ID that can used to piece up a single authentication flow.

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)
Headers

Contains the HTTP headers from the server response that indicated an error.

ResponseBody

Raw response body received from the server.

StatusCode

Gets the status code returned from HTTP layer. This status code is either the HttpStatusCode in the inner HttpRequestException response or the NavigateError Event Status Code in a browser based flow (See http://msdn.microsoft.com/en-us/library/bb268233(v=vs.85).aspx). You can use this code for purposes such as implementing retry logic or error investigation.

Methods

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.

Applies to