# List Assignable Roles For Resource

`GET /api/2.0/preview/accounts/{account_id}/access-control/assignable-roles`

Gets all the roles that can be granted on an account level resource. A role is grantable if the rule set on the
 resource can contain an access rule of the role.

API scopes: access-management

## Path parameters

- `account_id` (string, optional)
  <Databricks> account ID.

## Query parameters

- `resource` (string, optional)
  The resource name for which assignable roles will be listed.
  
   Examples | Summary
   :--- | :---
   `resource=accounts/<ACCOUNT_ID>` | A resource name for the account.
   `resource=accounts/<ACCOUNT_ID>/groups/<GROUP_ID>` | A resource name for the group.
   `resource=accounts/<ACCOUNT_ID>/servicePrincipals/<SP_ID>` | A resource name for the service principal.
   `resource=accounts/<ACCOUNT_ID>/tagPolicies/<TAG_POLICY_ID>` | A resource name for the tag policy.

## Returns

- `roles` (array of object, optional)
  - `name` (string, optional)
    Role to assign to a principal or a list of principals on a resource.

## Response

### A role that will grant the permissions of a marketplace admin.

```json
{
  "roles": [
    {
      "name": "roles/marketplace.admin"
    }
  ]
}
```

### Roles that can grant permissions on groups.

```json
{
  "roles": [
    {
      "name": "roles/group.manager"
    }
  ]
}
```

### Roles that can grant permissions on service principals.

```json
{
  "roles": [
    {
      "name": "roles/servicePrincipal.manager"
    },
    {
      "name": "roles/servicePrincipal.user"
    }
  ]
}
```

