> 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).

# OrganizationRole

## Members

### `api :` [`OrganizationApi`](/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`](/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](/reference/organization-api.md).

* `api` must be an instance of [`OrganizationApi`](/reference/identity-javascript-sdk/the-base-package/organizations/organizationapi.md);
* `member` must be an instance of [`OrganizationMembership`](/reference/identity-javascript-sdk/the-base-package/organizations/organizationmembership.md);
* `role` must implement the [`RoleReference`](/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()`](/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
}
```
