Exam-Answer

Home / Microsoft / AZ-300 / Question 79

Prev Question
Next Question

Question 79

You create a custom role named App Service Contributor in your Azure subscription.

All company developers are members of the Developers Azure Active Directory (AD) group, which is shown in the answer area.

You need to use Azure CLI to assign the App Service Contributor role to the developers.

Which command should you run?

az PLACEHOLDER 1 assignment create \

--role "App Service Contributor" \

--PLACEHOLDER 2 "5da75e7e-8d19-4f68-8ff1-c9f14298cb5d"

Select correct placeholder values.

Answers


Advertisement

Explanation (click to expand)

You should use the following cmdlet:

az role assignment create \

--role "App Service Contributor" \

--assignee-object-id "5da75e7e-8d19-4f68-8ff1-c9f14298cb5d"

The az role assignment create command assigns a role to a user, service principal, or group. The --role parameter specifies the name of the role. The --assignee-object-id parameter specifies the object ID associated with a security group.

You should not use the --assignee parameter. You should use this parameter when you specify the email alias for a user.

You should not specify Developers as the value of the --assignee-object-id parameter. You must specify the object ID associated with the Developers security group.

References (click to expand)

Prev Question
Next Question

Load more