Class MsalUiRequiredException
This exception class is to inform developers that UI interaction is required for authentication to succeed. It's thrown when calling AcquireTokenSilent(IEnumerable<string>, IAccount) or one of its overrides, and when the token does not exists in the cache, or the user needs to provide more content, or perform multiple factor authentication based on Azure AD policies, etc.. For more details, see https://aka.ms/msal-net-exceptions
public class MsalUiRequiredException : MsalServiceException, ISerializable
- Inheritance
-
MsalUiRequiredException
- Implements
- Derived
- Inherited Members
Constructors
MsalUiRequiredException(string, string)
Initializes a new instance of the exception class with a specified error code and error message.
public MsalUiRequiredException(string errorCode, string errorMessage)
Parameters
errorCode
stringThe error code returned by the service or generated by the client. This is the code you can rely on for exception handling.
errorMessage
stringThe error message that explains the reason for the exception.
MsalUiRequiredException(string, string, Exception)
Initializes a new instance of the exception class with a specified error code, error message and inner exception indicating the root cause.
public MsalUiRequiredException(string errorCode, string errorMessage, Exception innerException)
Parameters
errorCode
stringThe error code returned by the service or generated by the client. This is the code you can rely on for exception handling.
errorMessage
stringThe error message that explains the reason for the exception.
innerException
ExceptionRepresents the root cause of the exception.
MsalUiRequiredException(string, string, Exception, UiRequiredExceptionClassification)
Initializes a new instance of the exception class with a specified error code, error message and inner exception indicating the root cause.
public MsalUiRequiredException(string errorCode, string errorMessage, Exception innerException, UiRequiredExceptionClassification classification)
Parameters
errorCode
stringThe error code returned by the service or generated by the client. This is the code you can rely on for exception handling.
errorMessage
stringThe error message that explains the reason for the exception.
innerException
ExceptionRepresents the root cause of the exception.
classification
UiRequiredExceptionClassificationA higher level description for this exception, that allows handling code to understand what type of action it needs to take to resolve the issue.
Properties
Classification
Classification of the conditional access error, enabling you to do more actions or inform the user depending on your scenario. See https://aka.ms/msal-net-UiRequiredException for more details.
public UiRequiredExceptionClassification Classification { get; }