MSALAccount
Objective-C
@interface MSALAccount : NSObject <MSALAccount, NSCopying>
Swift
class MSALAccount : NSObject, MSALAccountProtocol, NSCopying
Representation of an authenticated account in the Microsoft identity platform. MSALAccount class implements MSALAccount
protocol.
Note
MSALAccount should be never created directly by an application. Instead, it is returned by MSAL as a result of getting a token interactively or silently (seeMSALResult
), or looked up by MSAL from cache (e.g. see -[MSALPublicClientApplication allAccounts:]
)
-
Unavailable
-[MSALAccount new]
is unavailable.Note
MSALAccount should be never created directly.Declaration
Objective-C
+ (nonnull instancetype)new;
-
Unavailable
-[[MSALAccount alloc] init]
is unavailable.Note
MSALAccount should be never created directly.Declaration
Objective-C
- (nonnull instancetype)init;
-
Array of all tenants for which a token has been requested by the client.
Note
This field will only be available when querying account(s) by the following APIs of MSALPublicClientApplication:-[MSALPublicClientApplication allAccounts:]
-[MSALPublicClientApplication accountForHomeAccountId:error:]
-[MSALPublicClientApplication accountForUsername:error:]
-[MSALPublicClientApplication allAccountsFilteredByAuthority:]
The field will be nil in other scenarios. E.g., account returned as part of the result of an acquire token interactive/silent call.
Declaration
Objective-C
@property (readonly, nullable) NSArray<MSALTenantProfile *> *tenantProfiles;
Swift
var tenantProfiles: [MSALTenantProfile]? { get }
-
Unique identifier of the account in the home tenant. Provides additional information regarding account’s home objectId and home tenantId in case of AAD.
Declaration
Objective-C
@property (readonly, nullable) MSALAccountId *homeAccountId;
Swift
var homeAccountId: MSALAccountId? { get }
-
Indicates that account is used for device wide SSO. This property is only available for organizational accounts when AAD SSO plugin is present on the device. It will be NO in all other cases.
Declaration
Objective-C
@property (readonly) BOOL isSSOAccount;
Swift
var isSSOAccount: Bool { get }