MSALDeviceTokenParameters

Objective-C

@interface MSALDeviceTokenParameters : MSALTokenParameters

Swift

class MSALDeviceTokenParameters : MSALTokenParameters

Token parameters to be used when MSAL is getting a token for a device. The resulting token won’t have a user identity associated with it.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

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

    Undocumented

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    + (nonnull instancetype)new;
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *tenantId

    Swift

    var tenantId: String? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *resource

    Swift

    var resource: String { get }

Constructing MSALDeviceTokenParameters

  • Initialize a MSALDeviceTokenParameters with a resource and optional scopes.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithResource:(nonnull NSString *)resource
                                      scopes:(nullable NSArray<NSString *> *)scopes
                                 forTenantId:(nonnull NSString *)tenantId;

    Swift

    init(resource: String, scopes: [String]?, forTenantId tenantId: String)

    Parameters

    resource

    The resource for which the token is requested. Resources MUST have a property set in MSODS permitting device_tokens to be issued for that resource.

    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. Can be nil.

    tenantId

    The tenant identifier.