---
title: "POST /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment"
method: POST
path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment"
tags: ["BillingRoleAssignments"]
---

# POST /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment

`POST /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment`

Adds a role assignment on a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.

## Path parameters

- `billingAccountName` string, required

## Query parameters

- `api-version` string, required

## Request body

- BillingRoleAssignmentPayload — The payload use to update role assignment on a scope
  - `principalId` string — The user's principal id that the role gets assigned to
  - `billingRoleDefinitionId` string — The role definition id

## Response `201`

Role assignment is successfully created

- BillingRoleAssignmentListResult — The list of role assignments.
  - `value` BillingRoleAssignment[] — The list of role assignments.
    - `id` string — Resource Id.
    - `name` string — Resource name.
    - `type` string — Resource type.
  - `nextLink` string — The link (url) to the next page of results.

## Other responses

- `default` — Error response describing why the operation failed.

## Changes

- **2019-08-14** (2019-10-01-preview) `4ff6e8983572` — 1 info
  - api operation id `BillingRoleAssignments_AddByBillingAccountName` removed and replaced with `BillingRoleAssignments_AddByBillingAccount`

[Change history](https://skmtc.dev/azure/apis/billingmanagementclient/changes/providers/Microsoft.Billing/billingAccounts/:billingAccountName/createBillingRoleAssignment/post.md)

---

[API](https://skmtc.dev/azure/apis/billingmanagementclient.md) · [All operations](https://skmtc.dev/azure/apis/billingmanagementclient/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/billingmanagementclient/revisions/481e7355ac16/schema)
