You are configuring permissions in Microsoft Entra ID for a Single Page Application (SPA) named TimeTrackerSPA. The application runs in the user's browser and must perform the following actions:
1. Retrieve the signed-in user's profile details from Microsoft Graph.
2. Read and write time entries using a custom backend Web API named TimeSheetAPI on behalf of the signed-in user.
The TimeSheetAPI application registration exposes a delegated scope named TimeSheet.Write.
Which permissions should you configure for the TimeTrackerSPA application registration?
- AMicrosoft Graph: Application permission User.Read.All; TimeSheetAPI: Application permission TimeSheet.Write
- BMicrosoft Graph: Delegated permission User.Read; TimeSheetAPI: Application permission TimeSheet.Write
- Microsoft Graph: Delegated permission User.Read; TimeSheetAPI: Delegated permission TimeSheet.WriteCevap
- DMicrosoft Graph: Delegated permission Directory.Read.All; TimeSheetAPI: Delegated permission TimeSheet.Write
Cevap
The correct permission configuration is Delegated permission: User.Read (from Microsoft Graph) and Delegated permission: TimeSheet.Write (from TimeSheetAPI).
The application is a Single Page Application (SPA) that runs in the browser under the context of the signed-in user. Therefore, it must use Delegated permissions to access resources on behalf of the user. To read the signed-in user's profile, the delegated permission 'User.Read' is sufficient and does not require administrator consent, fulfilling the principle of least privilege. To call the backend Web API on behalf of the user, the application must use the delegated scope 'TimeSheet.Write' exposed by the API.
Adım Adım Çözüm
Anahtar Kavram
Configuring Delegated permissions versus Application permissions and applying the principle of least privilege for Microsoft Entra ID app registrations.