An engineer is designing a background daemon service that synchronizes directory metadata across several external corporate Microsoft Entra ID tenants using the Microsoft Graph API. The service must operate with application-only permissions (`User.Read.All`), prevent consumer accounts (such as Outlook.com) from registering, and allow external tenant administrators to grant consent and run the sync process without user interaction.
Which configuration combination must be used to meet these requirements?
- AManifest signInAudience: AzureADMyOrg; Admin consent endpoint: https://login.microsoftonline.com/{tenant-id}/v2.0/adminconsent; Token acquisition endpoint: https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token
- Manifest signInAudience: AzureADMultipleOrgs; Admin consent endpoint: https://login.microsoftonline.com/{tenant-id}/v2.0/adminconsent; Token acquisition endpoint: https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/tokenAnswer
- CManifest signInAudience: AzureADMultipleOrgs; Admin consent endpoint: https://login.microsoftonline.com/organizations/v2.0/adminconsent; Token acquisition endpoint: https://login.microsoftonline.com/organizations/oauth2/v2.0/token
- DManifest signInAudience: AzureADandPersonalMicrosoftAccount; Admin consent endpoint: https://login.microsoftonline.com/common/v2.0/adminconsent; Token acquisition endpoint: https://login.microsoftonline.com/common/oauth2/v2.0/token
Answer
The configuration using 'AzureADMultipleOrgs' for signInAudience, combined with the tenant-specific endpoints for admin consent (https://login.microsoftonline.com/{tenant-id}/v2.0/adminconsent) and token acquisition (https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token).
Configuring the application with 'AzureADMultipleOrgs' ensures that only work or school accounts from Microsoft Entra ID can access the application, satisfying the requirement to prevent personal Microsoft accounts. For daemon applications that run in the background using application-only permissions (such as the client credentials flow), token acquisition requires a tenant-specific endpoint (containing the client's tenant ID or verified domain) because the identity provider cannot resolve the tenant context without an active user session. Similarly, administrative consent must be granted within a specific tenant context, requiring a tenant-specific admin consent endpoint.
Step-by-Step Solution
Key Concept
Multi-tenant daemon application configuration and endpoint routing in Microsoft Entra ID.