# api\_entities\_Asset\_Permissions.Permissions

[@polymeshassociation/polymesh-sdk](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes) / [Modules](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/modules) / [api/entities/Asset/Permissions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/modules-1/api_entities_asset_permissions) / Permissions

## Class: Permissions

[api/entities/Asset/Permissions](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/modules-1/api_entities_asset_permissions).Permissions

Handles all Asset Permissions related functionality

### Hierarchy

* `Namespace`<[`Asset`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_asset.asset)>

  ↳ **`Permissions`**

### Table of contents

#### Methods

* [createGroup](#creategroup)
* [getAgents](#getagents)
* [getGroup](#getgroup)
* [getGroups](#getgroups)
* [inviteAgent](#inviteagent)
* [removeAgent](#removeagent)

### Methods

#### createGroup

▸ **createGroup**(`args`, `opts?`): `Promise`<`TransactionQueue`<[`CustomPermissionGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_custompermissiongroup.custompermissiongroup), [`CustomPermissionGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_custompermissiongroup.custompermissiongroup), `unknown`\[]\[]>>

Create a Permission Group for this Asset. Identities can be assigned to Permission Groups as agents. Agents assigned to a Permission Group have said group's permissions over the Asset

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod), which means you can call [createGroup.checkAuthorization](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters**

| Name    | Type                                                                                                                                                     |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [`CreateGroupParams`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_procedures_creategroup.creategroupparams) |
| `opts?` | [`ProcedureOpts`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.procedureopts)                              |

**Returns**

`Promise`<`TransactionQueue`<[`CustomPermissionGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_custompermissiongroup.custompermissiongroup), [`CustomPermissionGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_custompermissiongroup.custompermissiongroup), `unknown`\[]\[]>>

**Defined in**

[api/entities/Asset/Permissions.ts:70](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Asset/Permissions.ts#L70)

***

#### getAgents

▸ **getAgents**(): `Promise`<[`AgentWithGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_entities_asset_types.agentwithgroup)\[]>

Retrieve a list of agents (Identities which have permissions over the Asset) and their respective Permission Groups

**Returns**

`Promise`<[`AgentWithGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_entities_asset_types.agentwithgroup)\[]>

**Defined in**

[api/entities/Asset/Permissions.ts:171](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Asset/Permissions.ts#L171)

***

#### getGroup

▸ **getGroup**(`args`): `Promise`<[`CustomPermissionGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_custompermissiongroup.custompermissiongroup)>

Retrieve a single Permission Group by its ID (or type). Passing an ID will fetch a Custom Permission Group, while passing a type will fetch a Known Permission Group

**`throws`** if there is no Permission Group with the passed ID

**Parameters**

| Name      | Type        |
| --------- | ----------- |
| `args`    | `Object`    |
| `args.id` | `BigNumber` |

**Returns**

`Promise`<[`CustomPermissionGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_custompermissiongroup.custompermissiongroup)>

**Defined in**

[api/entities/Asset/Permissions.ts:104](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Asset/Permissions.ts#L104)

▸ **getGroup**(`args`): `Promise`<[`KnownPermissionGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_knownpermissiongroup.knownpermissiongroup)>

**Parameters**

| Name        | Type                                                                                                                               |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `args`      | `Object`                                                                                                                           |
| `args.type` | [`PermissionGroupType`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/enums/types.permissiongrouptype) |

**Returns**

`Promise`<[`KnownPermissionGroup`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_knownpermissiongroup.knownpermissiongroup)>

**Defined in**

[api/entities/Asset/Permissions.ts:105](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Asset/Permissions.ts#L105)

***

#### getGroups

▸ **getGroups**(): `Promise`<[`PermissionGroups`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.permissiongroups)>

Retrieve all Permission Groups of this Asset

**Returns**

`Promise`<[`PermissionGroups`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.permissiongroups)>

**Defined in**

[api/entities/Asset/Permissions.ts:137](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Asset/Permissions.ts#L137)

***

#### inviteAgent

▸ **inviteAgent**(`args`, `opts?`): `Promise`<`TransactionQueue`<[`AuthorizationRequest`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_authorizationrequest.authorizationrequest), [`AuthorizationRequest`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_authorizationrequest.authorizationrequest), `unknown`\[]\[]>>

Invite an Identity to be an agent with permissions over this Asset

**`note`** this will create an [Authorization Request](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_authorizationrequest.authorizationrequest) which has to be accepted by the `target` Identity. An [Account](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_account.account) or [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_identity.identity) can fetch its pending Authorization Requests by calling [authorizations.getReceived](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/api_entities_common_namespaces_authorizations.authorizations#getreceived). Also, an Account or Identity can directly fetch the details of an Authorization Request by calling [authorizations.getOne](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/api_entities_common_namespaces_authorizations.authorizations#getone)

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod), which means you can call [inviteAgent.checkAuthorization](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters**

| Name    | Type                                                                                                                                                                             |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [`InviteExternalAgentParams`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_procedures_inviteexternalagent.inviteexternalagentparams) |
| `opts?` | [`ProcedureOpts`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.procedureopts)                                                      |

**Returns**

`Promise`<`TransactionQueue`<[`AuthorizationRequest`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_authorizationrequest.authorizationrequest), [`AuthorizationRequest`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_authorizationrequest.authorizationrequest), `unknown`\[]\[]>>

**Defined in**

[api/entities/Asset/Permissions.ts:84](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Asset/Permissions.ts#L84)

***

#### removeAgent

▸ **removeAgent**(`args`, `opts?`): `Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

Revoke an agent's permissions over this Asset

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod), which means you can call [removeAgent.checkAuthorization](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters**

| Name    | Type                                                                                                                                                                             |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [`RemoveExternalAgentParams`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_procedures_removeexternalagent.removeexternalagentparams) |
| `opts?` | [`ProcedureOpts`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.procedureopts)                                                      |

**Returns**

`Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

**Defined in**

[api/entities/Asset/Permissions.ts:94](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Asset/Permissions.ts#L94)
