# 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
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.vulos.io/reference/identity-javascript-sdk/the-base-package/organizations/organizationrole.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
