> For the complete documentation index, see [llms.txt](https://dev.vulos.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.vulos.io/reference/identity-javascript-sdk/the-base-package/organizations/organizationrole.md). Agents can also search and read this documentation through its [MCP server](https://dev.vulos.io/~gitbook/mcp).

# OrganizationRole

## Members

### `api :` [`OrganizationApi`](https://dev.vulos.io/reference/identity-javascript-sdk/the-base-package/organizations/organizationapi.md)

The `OrganizationAPI` that this object was created with.

### `id : string`

The id of this role.

### `name : string`

The name of this role.

### `member :` [`OrganizationMembership`](https://dev.vulos.io/reference/identity-javascript-sdk/the-base-package/organizations/organizationmembership.md)

The membership that this role is associated with.

## Methods

### `constructor(api, member, role)`

Create a new role object using the [Organization API](https://dev.vulos.io/reference/organization-api.md).

* `api` must be an instance of [`OrganizationApi`](https://dev.vulos.io/reference/identity-javascript-sdk/the-base-package/organizations/organizationapi.md);
* `member` must be an instance of [`OrganizationMembership`](https://dev.vulos.io/reference/identity-javascript-sdk/the-base-package/organizations/organizationmembership.md);
* `role` must implement the [`RoleReference`](https://dev.vulos.io/reference/identity-javascript-sdk/the-base-package/organizations/organizationapi.md#rolereference) interface;

{% hint style="warning" %}
This constructor should not be called directly, use [`OrganizationMembership.getRoles()`](https://dev.vulos.io/reference/identity-javascript-sdk/the-base-package/organizations/organizationmembership.md#async-getroles) instead.
{% endhint %}

### `async remove()`

Remove this role from the membership.

The result is a boolean that indicates success.

```javascript
if (await role.remove()) {
    // the role was successfully removed from the membership
}
```
