Enumerations

The following enumerations are available globally.

  • The sign-in audience specifies what kind of accounts you want to support in your app depending on the business needs for your application:

    For example, if you’re building an application that will be only used in your organization, you can specify MSALAudienceType as MSALAzureADMyOrgOnlyAudience, and specify what organization it is by passing its tenant ID

    If your app will be used by multiple organizations and you want to sign-in users with both their work and school accounts, you can specify MSALAudienceType as MSALAzureADAndPersonalMicrosoftAccountAudience.

    Note that effective audience will be also dependent on what you specify in your application registration. For example, if you specify sign in audience as My Org Only in your app registration, and in MSAL as Multiple Orgs, the effective audience for your application will be the minimum of those two (My Org Only). See instructions here: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#register-a-new-application-using-the-azure-portal

    See more

    Declaration

    Objective-C

    enum MSALAudienceType : NSInteger {}

    Swift

    enum MSALAudienceType : Int, @unchecked Sendable
  • All the national clouds authenticate users separately in each environment and have separate authentication endpoints. MSALAzureCloudInstance represents a national cloud environment that should be used for authentication. See instructions here: https://docs.microsoft.com/en-us/azure/active-directory/develop/authentication-national-cloud

    See more

    Declaration

    Objective-C

    enum MSALAzureCloudInstance : NSInteger {}

    Swift

    enum MSALAzureCloudInstance : Int, @unchecked Sendable
  • Target for the claims request. Only “access_token” and “id_token” are supported. “userinfo” is not supported.

    See more

    Declaration

    Objective-C

    enum MSALClaimsRequestTarget : NSUInteger {}

    Swift

    enum MSALClaimsRequestTarget : UInt, @unchecked Sendable
  • Levels of logging. Defines the priority of the logged message

    See more

    Declaration

    Objective-C

    enum MSALLogLevel : NSInteger {}
  • MSAL requires a web browser is required for interactive authentication. There are multiple web browsers available to complete authentication. MSAL will default to the web browser that provides best security and user experience for a given platform. MSALWebviewType allows changing the experience by customizing the configuration to other options for displaying web content

    See more

    Declaration

    Objective-C

    enum MSALWebviewType : NSInteger {}
  • Controls where would the credentials dialog reside. By default, when Microsoft Authenticator application is present on a device, MSAL will try to acquire a token through the Authenticator app To disable this behavior, set MSALBrokerAvailability to MSALBrokeredAvailabilityNone

    See more

    Declaration

    Objective-C

    enum MSALBrokeredAvailability : NSInteger {}
  • OIDC prompt parameter that specifies whether the Authorization Server prompts the End-User for reauthentication and consent.

    See more

    Declaration

    Objective-C

    enum MSALPromptType : NSUInteger {}
  • Device mode configured by the administrator

    See more

    Declaration

    Objective-C

    enum MSALDeviceMode : NSUInteger {}
  • Platform SSO status on macOS device

    See more

    Declaration

    Objective-C

    enum MSALPlatformSSOStatus : NSUInteger {}
  • Preferred auth method for MSAL requests. Can be configured by admin as part of MSALDeviceInformation and passed in the interactive params to the server.

    See more

    Declaration

    Objective-C

    enum MSALPreferredAuthMethod : NSUInteger {}
  • Undocumented

    See more

    Declaration

    Objective-C

    NS_ENUM(NSUInteger, MSALAuthScheme)
    {
        /*
            Bearer is the default authentication scheme
        */
        MSALAuthSchemeBearer,
        
        /*
            To access pop protected resources, set scheme to Pop
         */
        MSALAuthSchemePop
    }
  • Undocumented

    See more

    Declaration

    Objective-C

    NS_ENUM(NSUInteger, MSALHttpMethod)
    {
        /*
            Http Method for the pop resource
        */
        MSALHttpMethodGET,
        MSALHttpMethodHEAD,
        MSALHttpMethodPOST,
        MSALHttpMethodPUT,
        MSALHttpMethodDELETE,
        MSALHttpMethodCONNECT,
        MSALHttpMethodOPTIONS,
        MSALHttpMethodTRACE,
        MSALHttpMethodPATCH
        
    }
  • MSALError enum contains all errors that should be considered for handling in runtime.

    See more

    Declaration

    Objective-C

    enum MSALError : NSInteger {}

    Swift

    enum MSALError : Int, @unchecked Sendable
  • MSALInternalError enum contains all possible errors under MSALInternalErrorCodeKey. This enum exists only for the debugging and error information purposes, you should not try to recover from these errors in runtime.

    See more

    Declaration

    Objective-C

    enum MSALInternalError : NSInteger {}

    Swift

    enum MSALInternalError : Int, @unchecked Sendable
  • Specifies if MSALLegacySharedAccountsProvider will attempt to write/remove accounts.

    See more

    Declaration

    Objective-C

    enum MSALLegacySharedAccountMode : NSInteger {}

    Swift

    enum MSALLegacySharedAccountMode : Int, @unchecked Sendable
  • Undocumented

    See more

    Declaration

    Objective-C

    enum MSALLogMaskingLevel : NSInteger {}

    Swift

    enum MSALLogMaskingLevel : Int, @unchecked Sendable
  • The set of capabilities that an application wishes to support for Native Auth operations.

    Valid options are:

    • OOB: The application can support asking a user to supply a verification code that is sent by email.
    • Password: The application can support asking a user to supply a password
    See more

    Declaration

    Objective-C

    enum MSALNativeAuthChallengeTypes : NSInteger {}

    Swift

    struct MSALNativeAuthChallengeTypes : OptionSet, @unchecked Sendable
  • The possible Channel Types via which a code was sent

    See more

    Declaration

    Swift

    @objc
    public enum MSALNativeAuthChannelType : Int