Prepare and test your skills

Prepare and test your skills

Free sample question, answered and explained below. The AZ-500 Microsoft Azure Security Technologies Exam practice bank has 131 more like it. Try 10 free: instant score, no account.
A security-conscious organization is developing a critical backend daemon service that requires unattended access to Microsoft Graph. This service needs to perform two distinct, high-privilege operations:
The organization's security policy strictly enforces the principle of least privilege and mandates that all necessary permissions for this daemon service must be granted through admin consent.
Which configuration approach correctly defines the required permissions and ensures they are granted appropriately for this application?
User.Read.All and Mail.Send as Application permissions in the app registration manifest or Azure portal, and then grant these permissions via the Enterprise applications blade in the Azure portal, requiring admin consent.Application permissions, also known as app roles, are a type of permission used when an application needs to access data or perform actions without a signed-in user present. This is typical for daemon services, background processes, or automated tasks where the application acts on its own identity. When an application is granted an application permission, it has the ability to access any data associated with that permission across the entire tenant, independent of any individual user's privileges.
Admin consent is the process by which a global administrator (or other authorized administrator) grants permissions to an application on behalf of all users in the tenant. This is typically required for high-privilege permissions, application permissions, or when user consent has been restricted. Admin consent ensures that the organization maintains control over which applications can access sensitive data or perform broad actions.
This approach directly addresses all the requirements outlined in the scenario:
User.Read.All and Mail.Send as Application permissions, the service can operate without a signed-in user, fulfilling the daemon service requirement.User.Read.All application permission grants the service the ability to read the full profile details for all users in the Microsoft Entra tenant, as required.Mail.Send application permission allows the service to send emails, which can be configured to originate from a specific shared mailbox, meeting the requirement for sending emails without user interaction.User.Read.All provides read-only access to user profiles, and Mail.Send provides only the ability to send mail, not read it. These are the least privileged application permissions for the specified tasks, adhering to the security policy.User.Read.All and Mail.Send, the application is granted only the necessary access, minimizing potential risk.This configuration is optimal because it precisely matches the technical requirements of a daemon service needing app-only access to specific Microsoft Graph functionalities, while strictly adhering to the security mandates of least privilege and admin consent. Using application permissions ensures the service can run autonomously, and the specific permissions chosen (User.Read.All, Mail.Send) are tailored to the exact operations, avoiding over-privileging the application. The explicit requirement for admin consent is also directly satisfied by this method.
Directory.ReadWrite.All and Mail.ReadWrite as Application permissions in the app registration manifest, and then grant these permissions using PowerShell, requiring admin consent.This option suggests defining Directory.ReadWrite.All and Mail.ReadWrite as Application permissions and granting them via PowerShell with admin consent.
While using application permissions and admin consent is correct for a daemon service, this option violates the principle of least privilege:
User.Read.All (Application permission) is sufficient for this. Directory.ReadWrite.All grants the ability to read and write to the entire directory, including users, groups, and applications. This is significantly more access than required and introduces unnecessary risk.Mail.Send (Application permission) is sufficient for this. Mail.ReadWrite grants the ability to read, write, and send mail for all mailboxes. This is also significantly more access than required, as the service only needs to send emails, not read or modify existing ones.ReadWrite permissions when only Read or Send is needed is a major security flaw, increasing the blast radius if the application is compromised.This answer would be correct if the daemon service had explicit requirements to not only read user profiles but also modify directory objects (e.g., update user attributes, manage groups) and to not only send emails but also read and modify mailboxes (e.g., process incoming mail, manage folders). However, the scenario explicitly states only reading profiles and sending emails, making the ReadWrite permissions over-privileged.
User.Read.All and Mail.Send as Delegated permissions in the app registration, and instruct users to grant user consent when first accessing the service.Delegated permissions are used when an application acts on behalf of a signed-in user. The application's effective permissions are the intersection of the delegated permissions granted to the application and the user's own permissions. This means the application can never access more than what the user themselves could access.
User consent occurs when an individual user grants an application permission to access their data or act on their behalf. This is typically allowed for less privileged delegated permissions and is often presented to the user during their first sign-in to the application.
This option fails to meet several critical requirements of the scenario:
*.All scopes), would violate this policy.User.Read.All and Mail.Send can exist as delegated permissions, their effective scope would be limited by the individual user's permissions, not the tenant-wide access required for "all users" or sending from a "designated shared mailbox" without a specific user context.This answer would be correct if the scenario involved a client application (e.g., a web app or mobile app) where a user signs in, and the application needs to access data on behalf of that specific user (e.g., reading their own profile or sending emails from their own mailbox), and user consent for those specific delegated permissions was permissible by policy.
User.Read.All as an Application permission and Mail.Send as a Delegated permission in the app registration, then grant both using PowerShell, requiring admin consent for both.This option suggests a mixed approach: using an Application permission for User.Read.All and a Delegated permission for Mail.Send. It also specifies granting both via PowerShell with admin consent.
While using User.Read.All as an application permission is appropriate for the daemon service to read all user profiles, the inclusion of Mail.Send as a Delegated permission is fundamentally incompatible with the scenario's core requirements:
Mail.Send permission would necessitate a user context to send emails, which contradicts the app-only nature of the daemon service.Mail.Send permission would typically allow sending mail as the signed-in user. To send from a designated shared mailbox without user interaction, an application permission (Mail.Send as an application permission) is required, often combined with specific mailbox permissions or an application access policy in Exchange Online. A delegated permission does not facilitate this app-only, shared mailbox scenario.Mail.Send itself is least privileged for sending, using it as a delegated permission in an app-only context is an architectural mismatch and would likely lead to operational failures or require complex workarounds that violate the spirit of unattended access.This answer would be correct if the service were a hybrid application that sometimes acts on behalf of a user (for Mail.Send) and sometimes as itself (for User.Read.All), and the Mail.Send operation was intended to send emails as that specific signed-in user. However, this contradicts the "daemon service" and "unattended access" requirements for the email sending function.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated