# Method: billingAccounts.orders.licensePool.assign

- [HTTP request](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders.licensePool/assign#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders.licensePool/assign#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders.licensePool/assign#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders.licensePool/assign#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders.licensePool/assign#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders.licensePool/assign#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders.licensePool/assign#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/marketplace/docs/reference/consumerprocurement/rest/v1/billingAccounts.orders.licensePool/assign#try-it)

Assigns a license to a user.

### HTTP request

`POST https://cloudcommerceconsumerprocurement.googleapis.com/v1/{parent=billingAccounts/*/orders/*/licensePool}:assign`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. License pool name. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "usernames": [ string ] } ``` |

| Fields ||
|---|---|
| `usernames[]` | `string` Required. Username. Format: `name@domain.com`. |

### Response body

If successful, the response body is empty.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `consumerprocurement.licensePools.assign`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).