Microsoft.Authorization roleAssignments template reference

Template format

To create a Microsoft.Authorization/roleAssignments resource, add the following JSON to the resources section of your template.

  "name": "string",
  "type": "Microsoft.Authorization/roleAssignments",
  "apiVersion": "2015-07-01",
  "properties": {
    "roleDefinitionId": "string",
    "principalId": "string"

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Authorization/roleAssignments object

Name Type Required Value
name string Yes The name of the role assignment to create. It can be any valid GUID.
type enum Yes Microsoft.Authorization/roleAssignments
apiVersion enum Yes 2015-07-01
properties object Yes Role assignment properties. - RoleAssignmentProperties object

RoleAssignmentProperties object

Name Type Required Value
roleDefinitionId string Yes The role definition ID used in the role assignment.
principalId string Yes The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group.

Quickstart templates

The following quickstart templates deploy this resource type.