MSALAudienceType
Objective-C
enum MSALAudienceType : NSInteger {}
Swift
enum MSALAudienceType : Int, @unchecked Sendable
The sign-in audience specifies what kind of accounts you want to support in your app depending on the business needs for your application:
For example, if you’re building an application that will be only used in your organization, you can specify MSALAudienceType as MSALAzureADMyOrgOnlyAudience, and specify what organization it is by passing its tenant ID
If your app will be used by multiple organizations and you want to sign-in users with both their work and school accounts, you can specify MSALAudienceType as MSALAzureADAndPersonalMicrosoftAccountAudience.
Note that effective audience will be also dependent on what you specify in your application registration. For example, if you specify sign in audience as My Org Only in your app registration, and in MSAL as Multiple Orgs, the effective audience for your application will be the minimum of those two (My Org Only). See instructions here: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#register-a-new-application-using-the-azure-portal
-
Users with a personal Microsoft account, or a work or school account in any organization’s Azure AD tenant Maps to https://[instance]/common/
Declaration
Objective-C
MSALAzureADAndPersonalMicrosoftAccountAudience
Swift
case azureADAndPersonalMicrosoftAccountAudience = 0
-
Users with a Microsoft work or school account in any organization’s Azure AD tenant (i.e. multi-tenant). Maps to https://[instance]/organizations/
Declaration
Objective-C
MSALAzureADMultipleOrgsAudience
Swift
case azureADMultipleOrgsAudience = 1
-
Users with a Microsoft work or school account in my organization’s Azure AD tenant (i.e. single tenant). Maps to https://[instance]/[tenantId]
Declaration
Objective-C
MSALAzureADMyOrgOnlyAudience
Swift
case azureADMyOrgOnlyAudience = 2
-
Users with a personal Microsoft account. Maps to https://[instance]/consumers/
Declaration
Objective-C
MSALPersonalMicrosoftAccountAudience
Swift
case personalMicrosoftAccountAudience = 3