MSALTokenParameters

Objective-C

@interface MSALTokenParameters : MSALParameters

Swift

class MSALTokenParameters : MSALParameters

MSALTokenParameters is the base abstract class for all types of token parameters (see MSALInteractiveTokenParameters and MSALSilentTokenParameters).

Configuration parameters

  • Permissions you want included in the access token received in the result in the completionBlock. Not all scopes are guaranteed to be included in the access token returned.

    Declaration

    Objective-C

    @property (nonatomic) NSArray<NSString *> *_Nonnull scopes;

    Swift

    var scopes: [String] { get set }
  • An account object for which tokens should be returned.

    Declaration

    Objective-C

    @property (nonatomic, nullable) MSALAccount *account;

    Swift

    var account: MSALAccount? { get set }
  • The authority that MSAL will use to obtain tokens. Azure AD it is of the form https://aad_instance/aad_tenant, where aad_instance is the directory host (e.g. https://login.microsoftonline.com) and aad_tenant is a identifier within the directory itself (e.g. a domain associated to the tenant, such as contoso.onmicrosoft.com, or the GUID representing the TenantID property of the directory). If nil, authority from MSALPublicClientApplication will be used.

    Declaration

    Objective-C

    @property (nonatomic, nullable) MSALAuthority *authority;

    Swift

    var authority: MSALAuthority? { get set }
  • The claims parameter that needs to be sent to authorization or token endpoint. If claims parameter is passed in silent flow, access token will be skipped and refresh token will be tried.

    Declaration

    Objective-C

    @property (nonatomic, nullable) MSALClaimsRequest *claimsRequest;

    Swift

    var claimsRequest: MSALClaimsRequest? { get set }
  • Key-value pairs to pass to the /authorize and /token endpoints. This should not be url-encoded value.

    Declaration

    Objective-C

    @property (nonatomic, nullable) NSDictionary<NSString *, NSString *> *extraQueryParameters;

    Swift

    var extraQueryParameters: [String : String]? { get set }
  • UUID to correlate this request with the server.

    Declaration

    Objective-C

    @property (nonatomic, nullable) NSUUID *correlationId;

    Swift

    var correlationId: UUID? { get set }
  • Authentication Scheme to access the resource

    Declaration

    Objective-C

    @property (nonatomic, nullable) id<MSALAuthenticationSchemeProtocol> authenticationScheme;

    Swift

    var authenticationScheme: MSALAuthenticationSchemeProtocol? { get set }

Creating MSALTokenParameters

  • Initialize a MSALTokenParameters with scopes.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithScopes:(nonnull NSArray<NSString *> *)scopes;

    Swift

    init(scopes: [String])

    Parameters

    scopes

    Permissions you want included in the access token received in the result in the completionBlock. Not all scopes are guaranteed to be included in the access token returned.

Unavailable initializers

  • Unavailable

    Use [MSALTokenParameters initWithScopes:] instead

    Declaration

    Objective-C

    + (nonnull instancetype)new;
  • Unavailable

    Use [MSALTokenParameters initWithScopes:] instead

    Declaration

    Objective-C

    - (nonnull instancetype)init;