Role Assignments - Delete

Deletes a role assignment.

DELETE https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}?api-version=2015-07-01

URI Parameters

Name In Required Type Description
roleAssignmentName
path True
  • string

The name of the role assignment to delete.

scope
path True
  • string

The scope of the role assignment to delete.

api-version
query True
  • string

The API version to use for this operation.

Responses

Name Type Description
200 OK

OK - Returns information about the role assignment.

204 No Content

Role assignment already deleted or does not exist.

Other Status Codes

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Delete role assignment by name

Sample Request

DELETE https://management.azure.com/scope/providers/Microsoft.Authorization/roleAssignments/roleAssignmentName?api-version=2015-07-01

Sample Response

{
  "properties": {
    "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId",
    "principalId": "Pid",
    "scope": "/subscriptions/subId/resourcegroups/rgname"
  },
  "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId",
  "type": "Microsoft.Authorization/roleAssignments",
  "name": "roleassignmentId"
}

Definitions

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

RoleAssignment

Role Assignments

RoleAssignmentPropertiesWithScope

Role assignment properties with scope.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info
  • object

The additional info.

type
  • string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

The error additional info.

code
  • string

The error code.

details

The error details.

message
  • string

The error message.

target
  • string

The error target.

ErrorResponse

Error response

Name Type Description
error

The error object.

RoleAssignment

Role Assignments

Name Type Description
id
  • string

The role assignment ID.

name
  • string

The role assignment name.

properties

Role assignment properties.

type
  • string

The role assignment type.

RoleAssignmentPropertiesWithScope

Role assignment properties with scope.

Name Type Description
principalId
  • string

The principal ID.

roleDefinitionId
  • string

The role definition ID.

scope
  • string

The role assignment scope.