exam questions

Exam SC-300 All Questions

View all questions & answers for the SC-300 exam

Exam SC-300 topic 1 question 72 discussion

Actual exam question from Microsoft's SC-300
Question #: 72
Topic #: 1
[All SC-300 Questions]

You have an Azure subscription that contains a user named User1 and two resource groups named RG1 and RG2.

You need to ensure that User1 can perform the following tasks:

• View all resources.
• Restart virtual machines.
• Create virtual machines in RG1 only.
• Create storage accounts in RG1 only.

What is the minimum number of role-based access control (RBAC) role assignments required?

  • A. 1
  • B. 2
  • C. 3
  • D. 4
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
penatuna
Highly Voted 11 months, 1 week ago
Selected Answer: B
You need two role assignments, one for RG1 and other for RG2. If you make just one assignment for both of the Resource groups, User1 will have Virtual machine & Storage account creating rights in both resource groups. If you put the scope on Subscription or Management group that has these Resource groups, the resource groups will inherit the role assignment from higher level (parent) resource. You can make a custom role for RG1 with permissions shown below: */read - View all resources Microsoft.Compute/virtualMachines/restart/action - Restart virtual machines. Microsoft.Compute/virtualMachines/write - Creates a new virtual machine or updates an existing virtual machine. Microsoft.Storage/storageAccounts/write - Creates a storage account with the specified parameters or update the properties or tags or adds custom domain for the specified storage account. For RG2 you should make custom role with these permissions: */read - View all resources Microsoft.Compute/virtualMachines/restart/action - Restart virtual machines.
upvoted 9 times
...
[Removed]
Highly Voted 8 months, 3 weeks ago
Selected Answer: C
A. 1: Assigning a single role likely wouldn't provide all the required permissions. B. 2: It might be possible with two roles, but achieving granular control for resource group specific actions requires more than one. C. 3: This is the most likely scenario. We need separate role assignments for broader and specific resource group permissions. D. 4: While possible, 3 roles should be sufficient to achieve the desired outcome. Here's a breakdown of the minimum required RBAC role assignments: Reader role: This grants User1 the ability to view all resources across the subscription, fulfilling the first requirement. Contributor role for RG1: This grants User1 permission to create virtual machines and storage accounts within resource group RG1, addressing the needs for resource creation in a specific group. Virtual Machine Contributor role: This grants User1 the ability to restart virtual machines across the subscription, fulfilling the third requirement.
upvoted 5 times
...
_marc
Most Recent 1 day, 3 hours ago
Selected Answer: B
Can be done with 2 custom role assignments. The question doesn't explicitly state that only in-built roles can be used.
upvoted 1 times
...
JohnnyChimpo
2 weeks, 6 days ago
Selected Answer: C
This is a retarded question. It can be either 3 or 4
upvoted 2 times
...
khangkowng1
2 months ago
Selected Answer: C
Minimum Number of Role Assignments: To meet these requirements, User1 needs a combination of Reader, Virtual Machine Contributor, and Storage Account Contributor roles. Since there is overlap in the roles that allow User1 to restart VMs and create VMs, we can optimize the number of role assignments. Reader role at the subscription level. Virtual Machine Contributor role at RG1 (to allow both VM creation and VM restart in RG1). Storage Account Contributor role at RG1. Conclusion: The minimum number of role assignments required is 3. Thus, the correct answer is: C. 3
upvoted 4 times
...
emartiy
10 months, 3 weeks ago
Selected Answer: B
2 RBAC roles are sufficient to perform what in case.
upvoted 4 times
Alcpt
9 months, 2 weeks ago
Nope. #1 Global reader to read the entire sub, #2 vm contributor #3 vm contributor #4 storage account contributor
upvoted 4 times
...
emartiy
10 months, 2 weeks ago
I got this question checked via Copilot (Microsoft's ChatGpt:)) Answer is 4 roles. 1-view all resource (RG1 and RG2) 2-restart virtual machines scoped all rescource 3-Create virtual machine (Scoped resource based Virtual Machine Contributor role for RG1) (contributor role can create VM in RG1. If this role isn't given recourse scoped, can be able create VM in RG2 and it is not wanted based on question). 4-Create storage in RG1 (Scoped resource basedStorage Account Contributor role for RG1. If this role isn't given recourse scoped, can be able create storage in RG2 and it is not wanted based on question)
upvoted 2 times
Cybersecgirl
4 months, 4 weeks ago
When I checked it via copiloy it says 3, while chatgpt says 4 roles. I am more confused now.
upvoted 1 times
...
...
...
mb0812
10 months, 3 weeks ago
Selected Answer: C
Answer has to be C View all resources: READER role Restart virtual machines (it means RG1 and RG2 machines): VM contributor role Create VM/Storage accounts in RG1: Contributor role for RG1
upvoted 5 times
...
Ragdoll
11 months, 2 weeks ago
Selected Answer: B
2 roles are sufficient: - Reader on the subscription level. It fulfills the 1st requirement. - Contributor or Owner on RG1, which fulfills the 2nd requirement - There is nothing to do with RG2 because it's empty (I assume). So, no role should be assigned.
upvoted 3 times
mb0812
10 months, 3 weeks ago
How can you assume that RG2 has no VMs in it? Answer has to be C View all resources: READER role Restart virtual machines (it means RG1 and RG2 machines): VM contributor role Create VM/Storage accounts in RG1: Contributor role for RG1
upvoted 2 times
...
...
Sozo
12 months ago
Selected Answer: C
To enable User1 to perform the specified tasks in Azure, you would need at least three role-based access control (RBAC) role assignments: Reader Role: This role allows User1 to view all resources in both resource groups, RG1 and RG2. Virtual Machine Contributor Role: This role permits User1 to restart virtual machines. It should be assigned at the scope of both RG1 and RG2 to cover all virtual machines. Contributor Role for RG1: This role allows User1 to create virtual machines and storage accounts, but it should be assigned specifically to RG1 only. Therefore, the minimum number of RBAC role assignments required is 3, making option C the correct answer.
upvoted 4 times
...
Doinitza
12 months ago
It's 2 (B), by adding custom role/s.
upvoted 4 times
enklau
3 months, 4 weeks ago
yes i think the same
upvoted 1 times
...
...
loaysalameh
1 year ago
Selected Answer: C
3 roles Assign User1 the "Reader" role at the subscription level to view all resources. Assign User1 the "Virtual Machine Contributor" role at the RG1 level to restart virtual machines and create virtual machines in RG1 only. Assign User1 the "Storage Account Contributor" role at the RG1 level to create storage accounts in RG1 only.
upvoted 5 times
...
SFAY
1 year ago
Selected Answer: C
If least privilege is not a concern then you just need one role - Contributor for both R1 and R2 However, I believe we will always want least privileges and in that case you will need three RBAC roles: Reader - to view all resources in r1 and r2 as there are other resources besides VMs and SAs in the RGs. VM Contributor - To create & restart VMs Storage Account Contributor - To create storage accounts
upvoted 3 times
...
dbz_34
1 year ago
Selected Answer: A
technically 1 role is possible since the question doesn't require the use of the least privileges the role of contributor could suffice?
upvoted 1 times
dbz_34
1 year ago
i'm sorry i read the question too quickly only on rg1 to create a storage account and a virtual machine
upvoted 1 times
...
...
throwaway10188
1 year ago
You can TECHNICALLY provide all of it is requested with 2 roles (which the question is asking for) but if you wanted to be as strict as possible 4 roles would be the best IMO.
upvoted 2 times
klayytech
9 months, 3 weeks ago
yes correct he asked about how many RBAC assignments not about how many roles you will choose
upvoted 1 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago