MSALError

Objective-C

enum MSALError : NSInteger {}

Swift

enum MSALError : Int, @unchecked Sendable

MSALError enum contains all errors that should be considered for handling in runtime.

  • An unrecoverable error occured either within the MSAL client or on server side. Generally, this error cannot be resolved in runtime. Log the error, then inspect the MSALInternalErrorCodeKey in the userInfo dictionary. More detailed information about the specific error under MSALInternalErrorCodeKey can be found in MSALInternalError enum.

    Declaration

    Objective-C

    MSALErrorInternal = -50000

    Swift

    case `internal` = -50000
  • Workplace join is required to proceed. Handling of this error is optional.

    Declaration

    Objective-C

    MSALErrorWorkplaceJoinRequired = -50001

    Swift

    case workplaceJoinRequired = -50001
  • Interaction required errors occur because of a wide variety of errors returned by the authentication service. In all cases the proper response is to use a MSAL interactive AcquireToken call with the same parameters. For more details check MSALOAuthErrorKey and MSALOAuthErrorDescriptionKey in the userInfo dictionary. Handling of this error is required.

    Declaration

    Objective-C

    MSALErrorInteractionRequired = -50002

    Swift

    case interactionRequired = -50002
  • The request was not fully completed and some scopes were not granted access to. This can be caused by a user declining consent on certain scopes. For more details check MSALGrantedScopesKey and MSALDeclinedScopesKey in the userInfo dictionary. Handling of this error is required.

    Declaration

    Objective-C

    MSALErrorServerDeclinedScopes = -50003

    Swift

    case serverDeclinedScopes = -50003
  • The requested resource is protected by an Intune Conditional Access policy. The calling app should integrate the Intune SDK and call the remediateComplianceForIdentity:silent: API, please see https://aka.ms/intuneMAMSDK for more information. Handling of this error is optional (handle it only if you are going to access resources protected by an Intune Conditional Access policy).

    Declaration

    Objective-C

    MSALErrorServerProtectionPoliciesRequired = -50004

    Swift

    case serverProtectionPoliciesRequired = -50004
  • The user cancelled the web auth session by tapping the “Done” or “Cancel” button in the web browser. Handling of this error is optional.

    Declaration

    Objective-C

    MSALErrorUserCanceled = -50005

    Swift

    case userCanceled = -50005
  • The server error happens when server returns server_error

    Declaration

    Objective-C

    MSALErrorServerError = -50006

    Swift

    case serverError = -50006
  • Workplacejoin migrate device registration is required to proceed.

    Declaration

    Objective-C

    MSALErrorInsufficientDeviceStrength = -50007

    Swift

    case insufficientDeviceStrength = -50007