Type Definitions

The following type definitions are available globally.

  • The block that gets invoked after MSAL has finished getting a token silently or interactively.

    Declaration

    Objective-C

    typedef void (^MSALCompletionBlock)(MSALResult *_Nullable, NSError *_Nullable)

    Swift

    typealias MSALCompletionBlock = (MSALResult?, UnsafeMutablePointer<Int32>?) -> Void

    Parameters

    result

    Represents information returned to the application after a successful interactive or silent token acquisition. See MSALResult for more information.

    error

    Provides information about error that prevented MSAL from getting a token. See MSALError for possible errors.

  • The completion block that will be called when accounts are loaded, or MSAL encountered an error.

    Declaration

    Objective-C

    typedef void (^MSALAccountsCompletionBlock)(NSArray<MSALAccount *> *_Nullable,
                                                NSError *_Nullable)

    Swift

    typealias MSALAccountsCompletionBlock = (Int32) -> Void
  • The completion block that will be called when current account is loaded, or MSAL encountered an error.

    Declaration

    Objective-C

    typedef void (^MSALCurrentAccountCompletionBlock)(MSALAccount *_Nullable_result,
                                                      MSALAccount *_Nullable_result,
                                                      NSError *_Nullable)

    Swift

    typealias MSALCurrentAccountCompletionBlock = (MSALAccount?, MSALAccount?, UnsafeMutablePointer<Int32>?) -> Void
  • The completion block that will be called when sign out is completed, or MSAL encountered an error.

    Declaration

    Objective-C

    typedef void (^MSALSignoutCompletionBlock)(BOOL, NSError *_Nullable)

    Swift

    typealias MSALSignoutCompletionBlock = (Int32, UnsafeMutablePointer<Int32>?) -> Void
  • The completion block that will be called when MSAL has finished reading device state, or MSAL encountered an error.

    Declaration

    Objective-C

    typedef void (^MSALDeviceInformationCompletionBlock)(
        MSALDeviceInformation *_Nullable, NSError *_Nullable)

    Swift

    typealias MSALDeviceInformationCompletionBlock = (MSALDeviceInformation?, UnsafeMutablePointer<Int32>?) -> Void
  • The completion block that will be called when MSAL has finished reading device state, or MSAL encountered an error.

    Declaration

    Objective-C

    typedef void (^MSALWPJMetaDataCompletionBlock)(MSALWPJMetaData *_Nullable,
                                                   NSError *_Nullable)

    Swift

    typealias MSALWPJMetaDataCompletionBlock = (MSALWPJMetaData?, UnsafeMutablePointer<Int32>?) -> Void
  • The block that returns a MSAL log message.

    Declaration

    Objective-C

    typedef void (^MSALLogCallback)(MSALLogLevel, NSString *_Nullable, BOOL)

    Swift

    typealias MSALLogCallback = (Int32, UnsafeMutablePointer<Int32>?, Int32) -> Void

    Parameters

    level

    The level of the log message

    message

    The message being logged

    containsPII

    If the message might contain Personally Identifiable Information (PII) this will be true. Log messages possibly containing PII will not be sent to the callback unless PIllLoggingEnabled is set to YES on the logger.

  • MSAL telemetry callback.

    Declaration

    Objective-C

    typedef void (^MSALTelemetryCallback)(
        NSDictionary<NSString *, NSString *> *_Nonnull)

    Swift

    typealias MSALTelemetryCallback = (Int32) -> Void

    Parameters

    event

    Aggregated telemetry event.

  • Undocumented

    Declaration

    Objective-C

    typedef UIViewController    MSALViewController