You are developing a secure Web App named InventoryManager that runs on Azure App Service. The application must perform two main tasks:
1. Allow signed-in users to view their own profile details and manage their calendar events in Microsoft 365.
2. Run a scheduled background job every night to retrieve a list of all office groups in the tenant to update local access lists. This background job runs without a signed-in user.
You need to configure the app registration in Microsoft Entra ID.
Which of the following configurations must you apply to meet these requirements while adhering to the principle of least privilege? (Select TWO)
- Configure the Microsoft Graph delegated permissions User.Read and Calendars.ReadWrite, and allow signed-in users to consent to these permissions.Answer
- Configure the Microsoft Graph application permission Group.Read.All, and have a tenant administrator grant tenant-wide consent.Answer
- CConfigure the Microsoft Graph delegated permission Group.Read.All, and authenticate the background job using the OAuth 2.0 client credentials flow.
- DConfigure the background job to request the specific scope https://graph.microsoft.com/Group.Read.All dynamically during the token request.
Answer
Configure the Microsoft Graph delegated permissions User.Read and Calendars.ReadWrite for user-interactive operations, and configure the application permission Group.Read.All with tenant-wide administrator consent for the background daemon job.
For the user-centric features, the application runs on behalf of the signed-in user. This necessitates delegated permissions (User.Read and Calendars.ReadWrite) which are eligible for user consent. In contrast, the nightly background task operates independently of any user context, which requires a daemon flow (client credentials flow) and application-level permissions. Specifically, Group.Read.All is the correct application permission to read tenant groups, and because it is an application-level permission, it requires tenant-wide administrator consent.
Step-by-Step Solution
Key Concept
Differentiating delegated permissions and user consent from application permissions and admin consent in Microsoft Entra ID app registrations.