You are developing a web application named ComplianceHub and a backend Web API named AuditAPI. Both applications are registered in Microsoft Entra ID. The applications must meet the following security requirements:
1. ComplianceHub must allow signed-in users to read their own audit reports from AuditAPI.
2. A background archiving service must run nightly to read all audit logs from AuditAPI without user interaction.
You need to configure the permissions and scopes for the application registrations. Which two configurations should you perform? (Select two.)
- Configure AuditAPI to expose a delegated scope named Audits.Read, and grant the ComplianceHub app registration the delegated permission for api://<AuditAPI_App_ID>/Audits.Read.Answer
- Configure AuditAPI to expose an application permission (App Role) named Audits.Archive with the allowed member type set to Applications, grant ComplianceHub this permission, and obtain administrator consent.Answer
- CConfigure ComplianceHub to request the delegated permission api://<AuditAPI_App_ID>/Audits.Read for the background service, and acquire tokens using the OAuth 2.0 client credentials flow.
- DGenerate a Shared Access Signature (SAS) token containing read and write permissions, and configure ComplianceHub to pass this token in the Authorization header to AuditAPI.
- EConfigure AuditAPI to expose the scope Audits.Read as an application permission, and configure ComplianceHub to request it without administrator consent.
Answer
Configure the backend API to expose a delegated scope and grant the client application the delegated permission (api://<AuditAPI_App_ID>/Audits.Read) for user-interactive operations, and configure the backend API to expose an application permission (App Role) and obtain administrator consent for background operations.
The correct configurations involve defining a delegated scope on the API and granting it to the client for user-centric access, and defining an application permission (App Role) with admin consent for the service-to-service background access. For user-interactive access, the API exposes a scope (Audits.Read) and the client requests delegated access using the App ID URI prefix. For background access, the API exposes an App Role, which is assigned to the client application and requires admin consent.
Step-by-Step Solution
Key Concept
Microsoft Entra ID delegated permissions (scopes) vs. application permissions (App Roles) and consent requirements.