exam questions

Exam AZ-500 All Questions

View all questions & answers for the AZ-500 exam

Exam AZ-500 topic 2 question 88 discussion

Actual exam question from Microsoft's AZ-500
Question #: 88
Topic #: 2
[All AZ-500 Questions]

HOTSPOT
-

You have an Azure subscription that contains a resource group named RG1. RG1 contains a virtual machine named VM1 that uses Azure Active Directory (Azure AD) authentication.

You have two custom Azure roles named Role1 and Role2 that are scoped to RG1.

The permissions for Role1 are shown in the following JSON code.



The permissions for Role2 are shown in the following JSON code.



You assign the roles to the users shown in the following table.



For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
AzureJobsTillRetire
Highly Voted 2 years, 7 months ago
I thought the answers could be No Yes No Box1: User1 can delete VM1 - No User1 only has Role1, and Roles has notActions of VM delete. Box2: User2 can delete VM - Yes User2 has both Role1 and Role2 assigned. Role2 gives User2 the ability to delete VM. Box3: User3 can sign in to VM by using Azure AD credentials - No To be able to sign in to VM by using Azure AD credentials, User3 needs to have either Virtual Machine Administrator Login or Virtual Machine User Login. Those logins have actions defined in the dataActions section. For example, Microsoft.Compute/virtualMachines/login/action provides Log in to a virtual machine as a regular user. In both Role1 and Role2, the dataActions is not defined. Refs: https://learn.microsoft.com/en-us/azure/active-directory/devices/howto-vm-sign-in-azure-ad-windows https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#virtual-machine-administrator-login
upvoted 59 times
John07
1 month, 4 weeks ago
{ "role": "Virtual Machine Administrator Login", "description": "Grants a user the ability to log in as administrator to a virtual machine.", "permissions": { "compute": { "actions": [ "Microsoft.Compute/virtualMachines/login/action", "Microsoft.Compute/virtualMachines/read", "Microsoft.Compute/virtualMachines/write" ], "notActions": [] } }, "assignableScopes": [ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}" ] }
upvoted 1 times
...
schpeter_091
8 months, 3 weeks ago
correct answers. Supporting the login thingy: These are needed to be able to login: DataActions Microsoft.Compute/virtualMachines/login/action Log in to a virtual machine as a regular user Microsoft.Compute/virtualMachines/loginAsAdmin/action Log in to a virtual machine with Windows administrator or Linux root user privileges
upvoted 1 times
...
BayaliJihad
2 years, 3 months ago
I agree with you
upvoted 1 times
...
tecnicosoffshoretech
2 years, 3 months ago
Box3 should be yes, he has all the Virtual Machine roles since it has been granted with *
upvoted 4 times
zellck
2 years, 3 months ago
Logging in requires dataActions permissions, not actions permissions.
upvoted 12 times
MunnyStax
1 year, 5 months ago
The Virtual Machine Administrator Login and Virtual Machine User Login roles use dataActions, so they can't be assigned at the management group scope. Currently, you can assign these roles only at the subscription, resource group, or resource scope. https://learn.microsoft.com/en-us/entra/identity/devices/howto-vm-sign-in-azure-ad-windows
upvoted 1 times
...
massnonn
2 years, 2 months ago
DataActions it's only for storage https://learn.microsoft.com/en-us/azure/role-based-access-control/role-definitions#control-and-data-actions
upvoted 3 times
femzy
1 year, 8 months ago
Not true, look at what MS says on the Data Action section of compute provider...Microsoft.Compute/virtualMachines/loginAsAdmin/action Log in to a virtual machine with Windows administrator or Linux root user privileges
upvoted 1 times
bobbywong234
1 year, 6 months ago
Microsoft.Compute/virtualMachines/* should include all privileges for doing so
upvoted 2 times
...
...
...
...
...
...
Ajdlfasudfo0
Highly Voted 2 years, 6 months ago
N-Y-N https://learn.microsoft.com/en-us/azure/role-based-access-control/role-definitions#notactions If a user is assigned a role that excludes an action in NotActions, and is assigned a second role that grants access to the same action, the user is allowed to perform that action. NotActions is not a deny rule – it is simply a convenient way to create a set of allowed actions when specific actions need to be excluded.
upvoted 17 times
SSL2
1 year, 8 months ago
Makes sense
upvoted 2 times
...
...
ca7859c
Most Recent 2 months, 2 weeks ago
NYY Permission required for login: Microsoft.Compute/virtualMachines/login/action User has Microsoft.Compute/virtualMachines/*
upvoted 1 times
...
belyo
3 months ago
following this https://learn.microsoft.com/en-us/azure/role-based-access-control/overview#how-azure-rbac-determines-if-a-user-has-access-to-a-resource evaluation is for user over a resource once deny is defined - you cannot overdrive it regardless of how much allow actions are added no-no-no
upvoted 1 times
...
pentium75
1 year ago
No - has only Role1 which forbids deletion Yes - Role2 allows it No - No data actions
upvoted 1 times
...
nExoR
1 year ago
How Roles are Processed Aggregation: Azure RBAC aggregates all the Actions and NotActions from the roles assigned to the user. Most Restrictive Wins: Any action explicitly denied (NotActions) by any role will be denied, regardless of other roles granting that action. No Order or Priority: There is no specific order in which roles are processed, nor is there a predefined priority among roles. The system evaluates the combined set of permissions and applies the most restrictive policy. This cumulative and restrictive evaluation ensures that any specific denial of permissions (NotActions) is respected, thereby providing a secure and predictable access control mechanism.
upvoted 1 times
...
Atilgen
1 year, 2 months ago
You need "dataActions": [ "Microsoft.Compute/virtualMachines/login/action", "Microsoft.HybridCompute/machines/login/action" ], to be able to login a vm
upvoted 2 times
...
bob_sez
1 year, 8 months ago
As per this: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/control-plane-and-data-plane Logging into the server is an action on the data plane for which the user 3 does not have permission. So no for User 3 logging into the VM Overall: No, Yes, NO
upvoted 1 times
...
wardy1983
1 year, 9 months ago
Box1: User1 can delete VM1 - No User1 only has Role1, and Roles has notActions of VM delete. Box2: User2 can delete VM - Yes User2 has both Role1 and Role2 assigned. Role2 gives User2 the ability to delete VM. Box3: User3 can sign in to VM by using Azure AD credentials - No To be able to sign in to VM by using Azure AD credentials, User3 needs to have either Virtual Machine Administrator Login or Virtual Machine User Login. Those logins have actions defined in the dataActions section. For example, Microsoft.Compute/virtualMachines/login/action provides Log in to a virtual machine as a regular user. In both Role1 and Role2, the dataActions is not defined.
upvoted 2 times
...
wardy1983
1 year, 9 months ago
Box1: User1 can delete VM1 - No User1 only has Role1, and Roles has notActions of VM delete. Box2: User2 can delete VM - Yes User2 has both Role1 and Role2 assigned. Role2 gives User2 the ability to delete VM. Box3: User3 can sign in to VM by using Azure AD credentials - No To be able to sign in to VM by using Azure AD credentials, User3 needs to have either Virtual Machine Administrator Login or Virtual Machine User Login. Those logins have actions defined in the dataActions section. For example, Microsoft.Compute/virtualMachines/login/action provides Log in to a virtual machine as a regular user. In both Role1 and Role2, the dataActions is not defined.
upvoted 1 times
...
heatfan900
1 year, 11 months ago
Y, Y, N USER 1 CAN DELETE THE VM AS THEY HAVE THE RIGHT TO DO SO AS PER THE WILDCARD IN THE 'ACTIONS' SECTION. WHEN THERE IS A CONFLICT BETWEEN 'ACTIONS' AND 'NOT ACTIONS' THE PRIOR ALWAYS WINS. THIS IS NOT LIKE ALLOW/DENY WHERE DENY ALWAYS WINS OUT DURING A CONFLICT. USER 2 CAN DO SO AS WELL AS THE PERMISSIONS CLEARLY STATE. USER 3 CANNOT AUTHENTICATE TO THE VM WITH AZURE BECAUSE THE ROLES DO NOT HAVE THE PERMISSIONS SET TO DO THIS.
upvoted 2 times
STC007
1 year, 10 months ago
Hi, User1 cannot delete the VM, "The NotActions permission specifies the control plane actions that are subtracted or excluded from the allowed Actions that have a wildcard (*)." https://learn.microsoft.com/en-us/azure/role-based-access-control/role-definitions#notactions Use the NotActions permission if the set of actions that you want to allow is more easily defined by subtracting from Actions that have a wildcard (*). Actions - NotActions = Effective control plane permissions
upvoted 3 times
...
...
Self_Study
2 years ago
On exam 7/8/23. NYN for me.
upvoted 3 times
...
Ario
2 years, 1 month ago
No YEs NO
upvoted 1 times
...
zellck
2 years, 3 months ago
NYN is the answer. https://learn.microsoft.com/en-us/azure/role-based-access-control/role-definitions#notactions If a user is assigned a role that excludes an action in NotActions, and is assigned a second role that grants access to the same action, the user is allowed to perform that action. NotActions is not a deny rule – it is simply a convenient way to create a set of allowed actions when specific actions need to be excluded.
upvoted 7 times
zellck
2 years, 3 months ago
https://learn.microsoft.com/en-us/azure/active-directory/devices/howto-vm-sign-in-azure-ad-windows#configure-role-assignments-for-the-vm Now that you've created the VM, you need to configure an Azure RBAC policy to determine who can log in to the VM. Two Azure roles are used to authorize VM login: - Virtual Machine Administrator Login: Users who have this role assigned can log in to an Azure virtual machine with administrator privileges. - Virtual Machine User Login: Users who have this role assigned can log in to an Azure virtual machine with regular user privileges. https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#virtual-machine-administrator-login https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#virtual-machine-user-login Logging in requires dataActions permissions, not actions permissions.
upvoted 4 times
...
...
Alexbz
2 years, 3 months ago
I tried to replicate this scenario in my lab and I got No for all three options. However maybe I was missing something and I'm wrong. I created 2 custom roles with the same permissions and assigned them to the users, none of them even could see the VM. Then I assigned them Reader role and tried again but I was not able to either delete or login to the VM with either of these three users.
upvoted 3 times
...
Diaperface
2 years, 4 months ago
I think N-N-Y. "Deny assignments block users from performing specific Azure resource actions even if a role assignment grants them access." - https://learn.microsoft.com/en-us/azure/role-based-access-control/deny-assignments
upvoted 4 times
tecnicosoffshoretech
2 years, 3 months ago
This is not correct, since it is a ¨Not actions¨ not a deny rule NotActions and deny assignments are not the same and serve different purposes. NotActions are a convenient way to subtract specific actions from a wildcard (*) action. ¨Deny assignments block users from performing specific actions even if a role assignment grants them access¨ https://learn.microsoft.com/en-us/azure/role-based-access-control/role-definitions#differences-between-notactions-and-deny-assignments
upvoted 1 times
...
...
majstor86
2 years, 5 months ago
NO YES NO
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...