exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 16 question 1 discussion

Actual exam question from Microsoft's AZ-104
Question #: 1
Topic #: 16
[All AZ-104 Questions]

HOTSPOT -
You need to implement Role1.
Which command should you run before you create Role1? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

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
Gromble_ziz
Highly Voted 3 years, 6 months ago
Get-AzRoleDefinition -name "Reader" |ConvertTo-Json https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions-list?tabs=roles
upvoted 89 times
Gromble_ziz
3 years, 6 months ago
Addition: Create customer azure role from Json https://docs.microsoft.com/en-us/powershell/module/az.resources/new-azroledefinition?view=azps-6.2.0#example-2--create-using-json-file
upvoted 8 times
...
Panapi
1 year, 10 months ago
Answer valid! This question was on the exam 22/02/2023. Scored 920.
upvoted 6 times
...
...
atilla
Highly Voted 2 years, 8 months ago
yes lets memorize all this azure cli commands... I got it correct becaouse I have a bit experience, but I look it up in the documentation
upvoted 22 times
...
SeMo0o0o0o
Most Recent 2 months, 2 weeks ago
CORRECT
upvoted 3 times
...
PMPft17
2 months, 3 weeks ago
Alright makes sense. We first need to get the basis of the RBAC "Reader" role. To do that we use the PowerShell/CLI command to first get the role definition. Once we have that, we can use the "New" commandlet to create a custom role based on the JSON definition.
upvoted 1 times
...
23169fd
7 months ago
To implement Role1, which is a custom Azure role based on the Reader role, you need to retrieve the definition of the Reader role first. The appropriate command to use for this purpose is: Get-AzRoleDefinition -Name "Reader" and ConvertTo-Json
upvoted 1 times
...
MatAlves
11 months ago
Get-AzRoleDefinition <role_name> | ConvertTo-Json https://learn.microsoft.com/en-us/azure/role-based-access-control/role-definitions-list?tabs=roles
upvoted 1 times
...
Rams786
1 year, 3 months ago
This question was on my exam on 22 Sep 2023. scored 900 i answered most Voted
upvoted 5 times
...
DimsumDestroyer
1 year, 4 months ago
Has anyone actually ever tried this irl? The answer is technically correct, but ConvertTo-Json has a default object depth of 2. I wonder if there are information lost on just using the default depth rather than specifying it to go deeper with the -depth parameter.
upvoted 1 times
...
iRish
1 year, 7 months ago
https://learn.microsoft.com/en-us/azure/role-based-access-control/tutorial-custom-role-powershell This also shows why we need to convert the output to JSON
upvoted 1 times
...
CyberKelev
1 year, 10 months ago
Get-AzRoleDefinition -Name "Reader" | ConvertTo-Json
upvoted 2 times
...
michaelmorar
2 years, 8 months ago
Get-AzRoleDefinition + ConvertTo-Json
upvoted 2 times
...
ajayasa
2 years, 10 months ago
this casestudy was there on 16/03/2022 with same question and passed with 900 percent
upvoted 2 times
...
ajayasa
2 years, 10 months ago
this casestudy but not same question was there on 16/03/2022 with same question and passed with 900 percent
upvoted 1 times
...
ajayasa
2 years, 10 months ago
this case study was there on 16/03/2022 with same question and passed with 900 percent and provided the answer mentioned in the answer section
upvoted 1 times
...
benvdw
2 years, 10 months ago
on exam 13/3/2022
upvoted 1 times
...
husam421
2 years, 11 months ago
in exam 10/2/2022
upvoted 3 times
...
FabioVi
2 years, 11 months ago
Correct. As the requirement states "Create a custom Azure role named Role1 that is based on the Reader role"... ... then you first need to know what the Reader role implies.
upvoted 4 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