MSALResult

Objective-C

@interface MSALResult : NSObject

Swift

class MSALResult : NSObject

MSALResult represents information returned to the application after a successful interactive or silent token acquisition. It contains information requested by the application (e.g. access_token and id_token), and information that can be used to get a token silently from MSAL (e.g. account).

Token response

  • The Access Token requested. Note that if access token is not returned in token response, this property will be returned as an empty string.

    Declaration

    Objective-C

    @property (readonly, nonnull) NSString *accessToken;

    Swift

    var accessToken: String { get }
  • The time that the access token returned in the Token property ceases to be valid. This value is calculated based on current UTC time measured locally and the value expiresIn returned from the service

    Declaration

    Objective-C

    @property (readonly, nullable) NSDate *expiresOn;

    Swift

    var expiresOn: Date? { get }
  • Some access tokens have extended lifetime when server is in an unavailable state. This property indicates whether the access token is returned in such a state.

    Declaration

    Objective-C

    @property (readonly) BOOL extendedLifeTimeToken;

    Swift

    var extendedLifeTimeToken: Bool { get }
  • Deprecated

    Use MSALTenantProfile.tenantId instead

    An identifier for the tenant that the token was acquired from. This property will be nil if tenant information is not returned by the service.

    Declaration

    Objective-C

    @property (readonly, nullable) NSString *tenantId;

    Swift

    var tenantId: String? { get }
  • The raw id token if it’s returned by the service or nil if no id token is returned.

    Declaration

    Objective-C

    @property (readonly, nullable) NSString *idToken;

    Swift

    var idToken: String? { get }
  • The scope values returned from the service.

    Declaration

    Objective-C

    @property (readonly, nonnull) NSArray<NSString *> *scopes;

    Swift

    var scopes: [String] { get }

Account information

  • A tenant profile object that contains all the tenant-specific information, including tenant id, user object id, etc. It also contains all the id token claims as a dictionary.

    Declaration

    Objective-C

    @property (readonly, nonnull) MSALTenantProfile *tenantProfile;

    Swift

    var tenantProfile: MSALTenantProfile { get }
  • The account object that holds account information.

    Declaration

    Objective-C

    @property (readonly, nonnull) MSALAccount *account;

    Swift

    var account: MSALAccount { get }
  • Deprecated

    Use MSALTenantProfile.identifier instead

    The unique id of the account.

    Declaration

    Objective-C

    @property (readonly, nullable) NSString *uniqueId;

    Swift

    var uniqueId: String? { get }

Request information

  • Represents the authority used for getting the token from STS and caching it. This authority should be used for subsequent silent requests. It might be different from the authority provided by developer (e.g. for sovereign cloud scenarios).

    Declaration

    Objective-C

    @property (readonly, nonnull) MSALAuthority *authority;

    Swift

    var authority: MSALAuthority { get }
  • The correlation ID of the request.

    Declaration

    Objective-C

    @property (readonly, nonnull) NSUUID *correlationId;

    Swift

    var correlationId: UUID { get }
  • The authorization header for the specific authentication scheme . For instance “Bearer …” or “Pop …”.

    Declaration

    Objective-C

    @property (readonly, nonnull) NSString *authorizationHeader;

    Swift

    var authorizationHeader: String { get }
  • The authentication scheme for the tokens issued. For instance “Bearer ” or “Pop”.

    Declaration

    Objective-C

    @property (readonly, nonnull) NSString *authenticationScheme;

    Swift

    var authenticationScheme: String { get }