Soru

Zorluk: OrtaPermissions, Scopes, and Consent

You are developing a daemon application named 'BillingJob' that runs nightly as a background service on an Azure Virtual Machine. The application must query Microsoft Graph to retrieve the profile details of all users in the Microsoft Entra ID tenant to generate monthly billing reports. No user is signed in when the application runs.

You need to configure the permissions for the application registration in Microsoft Entra ID while adhering to the principle of least privilege.

Which configuration should you implement?

  1. Add the Microsoft Graph User.Read.All Application permission to the application registration, and grant admin consent for the tenant.Cevap
  2. B
    Add the Microsoft Graph User.Read.All Delegated permission to the application registration, and have users consent to the permission when they next sign in.
  3. C
    Add the Microsoft Graph Directory.Read.All Delegated permission to the application registration, and grant admin consent for the tenant.
  4. D
    Generate a Shared Access Signature (SAS) token with directory-level read scope, and store it in Azure Key Vault for the application to authenticate against Microsoft Graph.

Cevap

Add the Microsoft Graph User.Read.All Application permission to the application registration, and grant admin consent for the tenant.
Because the application runs as a background daemon service without user interaction, it cannot acquire a user context and must use Application permissions. The User.Read.All permission allows reading full user profiles for all accounts, and because it is an Application permission, it requires tenant administrator consent. This satisfies the requirement using the principle of least privilege.

Adım Adım Çözüm

1
Determine the application type and interaction context.
The application runs as a background service (daemon) without any signed-in user.
This establishes that Delegated permissions cannot be used, and Application permissions (app roles) are required.
2
Identify the required data and the corresponding Microsoft Graph permission.
The application needs to read user profile details for all users in the tenant, which maps to the User.Read.All permission.
Using User.Read.All is the most restrictive permission that satisfies the requirement, aligning with the principle of least privilege.
3
Determine the consent requirement for the selected permission.
Application permissions for User.Read.All require administrator consent.
Microsoft Entra ID requires tenant administrator approval for application permissions that access organization-wide directory data.

Anahtar Kavram

Daemon applications running without user context must use Application permissions and require admin consent for directory-wide scopes.
Bu soruyu puanla