Share via


Billing Role Assignments - Delete By Department

Deletes a role assignment on a department. The operation is supported only for billing accounts with agreement type Enterprise Agreement.

DELETE https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleAssignments/{billingRoleAssignmentName}?api-version=2024-04-01

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

pattern: ^([0-9]+|([Pp][Cc][Nn]\.[A-Za-z0-9]+)|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}(-[0-9]{2}){2})?)$

The ID that uniquely identifies a billing account.

billingRoleAssignmentName
path True

string

pattern: ^[a-fA-F0-9]{8}[-]?([a-fA-F0-9]{4}[-]?){3}[a-fA-F0-9]{12}(_[a-fA-F0-9]{8}[-]?([a-fA-F0-9]{4}[-]?){3}[a-fA-F0-9]{12})?$

The ID that uniquely identifies a role assignment.

departmentName
path True

string

pattern: ^[a-zA-Z\d-_]{1,128}$

The name of the department.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

Resource deleted successfully.

204 No Content

Resource does not exist.

Other Status Codes

ErrorResponse

An unexpected error response.

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

BillingRoleAssignmentDeleteByDepartment

Sample request

DELETE https://management.azure.com/providers/Microsoft.Billing/billingAccounts/8608480/departments/123456/billingRoleAssignments/9dfd08c2-62a3-4d47-85bd-1cdba1408402?api-version=2024-04-01

Sample response

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

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

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.