MSALAADAuthority

Objective-C

@interface MSALAADAuthority : MSALAuthority

Swift

class MSALAADAuthority : MSALAuthority

An Azure Active Directory (AAD) authority indicating a directory that MSAL can use to obtain tokens. For AAD it is of the form https://aad_instance/aad_tenant, where aad_instance is the directory host (e.g. 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)

Initializing MSALAADAuthority with a URL

  • Initializes MSALAADAuthority with NSURL.

    Declaration

    Objective-C

    - (nullable instancetype)initWithURL:(nonnull NSURL *)url
                                   error:(NSError *_Nullable *_Nullable)error;

    Swift

    convenience init(url: URL) throws

    Parameters

    url

    Authority indicating a directory that MSAL can use to obtain tokens. In 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)

    error

    The error that occurred creating the authority object, if any, if you’re not interested in the specific error pass in nil.

  • Initializes MSALAADAuthority with NSURL and tenant ID.

    Declaration

    Objective-C

    - (nullable instancetype)initWithURL:(nonnull NSURL *)url
                               rawTenant:(nullable NSString *)rawTenant
                                   error:(NSError *_Nullable *_Nullable)error;

    Swift

    init(url: URL, rawTenant: String?) throws

    Parameters

    url

    Authority indicating a directory that MSAL can use to obtain tokens. In 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)

    rawTenant

    GUID representing the TenantID of your Azure Active Directory

    error

    The error that occurred creating the authority object, if any, if you’re not interested in the specific error pass in nil.

Initializing MSALAADAuthority with a cloud instance and a sign-in audience

  • Initializes MSALAADAuthority with a cloud instance, audience type and an optional tenant ID.

    Declaration

    Objective-C

    - (nullable instancetype)
        initWithCloudInstance:(MSALAzureCloudInstance)cloudInstance
                 audienceType:(MSALAudienceType)audienceType
                    rawTenant:(nullable NSString *)rawTenant
                        error:(NSError *_Nullable *_Nullable)error;

    Swift

    convenience init(cloudInstance: MSALAzureCloudInstance, audienceType: MSALAudienceType, rawTenant: String?) throws

    Parameters

    cloudInstance

    Azure AD authentication endpoint in a national cloud (see MSALAzureCloudInstance)

    audienceType

    The sign-in audience for the authority (see MSALAudienceType)

    rawTenant

    GUID representing the TenantID of your Azure Active Directory

    error

    The error that occurred creating the authority object, if any, if you’re not interested in the specific error pass in nil.

  • Initializes MSALAADAuthority with a cloud instance, audience type and an optional tenant ID.

    Declaration

    Objective-C

    - (nullable instancetype)initWithEnvironment:(nonnull NSString *)environment
                                    audienceType:(MSALAudienceType)audienceType
                                       rawTenant:(nullable NSString *)rawTenant
                                           error:
                                               (NSError *_Nullable *_Nullable)error;

    Swift

    convenience init(environment: String, audienceType: MSALAudienceType, rawTenant: String?) throws

    Parameters

    environment

    Host of Azure AD authentication endpoint in a national cloud (e.g. “login.microsoftonline.com” or “login.microsoftonline.de”)

    audienceType

    The sign-in audience for the authority (see MSALAudienceType)

    rawTenant

    GUID representing the TenantID of your Azure Active Directory

    error

    The error that occurred creating the authority object, if any, if you’re not interested in the specific error pass in nil.