> For the complete documentation index, see [llms.txt](https://developers.polymath.network/polymesh-sdk-api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v10/classes/permissions.md).

# Permissions

Handles all Security Token Permissions related functionality Permissions a Secondary Key has over the Identity. A null value means the key has all permissions of that type (i.e. if `tokens` is null, the key has permissions over all of the Identity's Security Tokens)

## Hierarchy

* Namespace‹[SecurityToken](/polymesh-sdk-api-reference/docs-v10/classes/securitytoken.md)›

  ↳ **Permissions**

## Index

### Properties

* [context](#protected-context)
* [parent](#protected-parent)
* [portfolios](#portfolios)
* [tokens](#tokens)
* [transactionGroups](#transactiongroups)
* [transactions](#transactions)

### Methods

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

## Properties

### `Protected` context

• **context**: [*Context*](/polymesh-sdk-api-reference/docs-v10/classes/context.md)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:11*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/Namespace.ts#L11)

### `Protected` parent

• **parent**: [*SecurityToken*](/polymesh-sdk-api-reference/docs-v10/classes/securitytoken.md)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:9*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/Namespace.ts#L9)

### portfolios

• **portfolios**: [*SectionPermissions*](/polymesh-sdk-api-reference/docs-v10/interfaces/sectionpermissions.md)*‹*[*DefaultPortfolio*](/polymesh-sdk-api-reference/docs-v10/classes/defaultportfolio.md) *|* [*NumberedPortfolio*](/polymesh-sdk-api-reference/docs-v10/classes/numberedportfolio.md)*› | null*

*Defined in* [*src/types/index.ts:809*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/types/index.ts#L809)

### tokens

• **tokens**: [*SectionPermissions*](/polymesh-sdk-api-reference/docs-v10/interfaces/sectionpermissions.md)*‹*[*SecurityToken*](/polymesh-sdk-api-reference/docs-v10/classes/securitytoken.md)*› | null*

*Defined in* [*src/types/index.ts:795*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/types/index.ts#L795)

Security Tokens over which this key has permissions

### transactionGroups

• **transactionGroups**: [*TxGroup*](/polymesh-sdk-api-reference/docs-v10/enums/txgroup.md)*\[]*

*Defined in* [*src/types/index.ts:807*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/types/index.ts#L807)

list of Transaction Groups this key can execute. Having permissions over a TxGroup means having permissions over every TxTag in said group. Partial group permissions are not covered by this value. For a full picture of transaction permissions, see the `transactions` property

NOTE: If transactions is null, ignore this value

### transactions

• **transactions**: [*TransactionPermissions*](/polymesh-sdk-api-reference/docs-v10/interfaces/transactionpermissions.md) *| null*

*Defined in* [*src/types/index.ts:799*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/types/index.ts#L799)

Transactions this key can execute

## Methods

### createGroup

▸ **createGroup**(`args`: [CreateGroupParams](/polymesh-sdk-api-reference/docs-v10/interfaces/creategroupparams.md), `opts?`: [ProcedureOpts](/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue.md)*‹*[*CustomPermissionGroup*](/polymesh-sdk-api-reference/docs-v10/classes/custompermissiongroup.md)*››*

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:63*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/Permissions.ts#L63)

Create a Permission group for this Security Token. Identities can then be assigned to said group as Agents. Agents assigned to a group have said group's permissions over this Security Token

**`note`** this method is of type [ProcedureMethod](/polymesh-sdk-api-reference/docs-v10/interfaces/proceduremethod.md), which means you can call `createGroup.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                      |
| ------- | ----------------------------------------------------------------------------------------- |
| `args`  | [CreateGroupParams](/polymesh-sdk-api-reference/docs-v10/interfaces/creategroupparams.md) |
| `opts?` | [ProcedureOpts](/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts.md)         |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue.md)*‹*[*CustomPermissionGroup*](/polymesh-sdk-api-reference/docs-v10/classes/custompermissiongroup.md)*››*

### getAgents

▸ **getAgents**(): *Promise‹*[*AgentWithGroup*](/polymesh-sdk-api-reference/docs-v10/interfaces/agentwithgroup.md)*\[]›*

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:163*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/Permissions.ts#L163)

Retrieve a list of Agents (Identities which have permissions over the Security Token) and their respective Permission Groups

**Returns:** *Promise‹*[*AgentWithGroup*](/polymesh-sdk-api-reference/docs-v10/interfaces/agentwithgroup.md)*\[]›*

### getGroup

▸ **getGroup**(`args`: object): *Promise‹*[*CustomPermissionGroup*](/polymesh-sdk-api-reference/docs-v10/classes/custompermissiongroup.md)*›*

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:93*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/Permissions.ts#L93)

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:**

▪ **args**: *object*

| Name | Type      |
| ---- | --------- |
| `id` | BigNumber |

**Returns:** *Promise‹*[*CustomPermissionGroup*](/polymesh-sdk-api-reference/docs-v10/classes/custompermissiongroup.md)*›*

▸ **getGroup**(`args`: object): *Promise‹*[*KnownPermissionGroup*](/polymesh-sdk-api-reference/docs-v10/classes/knownpermissiongroup.md)*›*

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:94*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/Permissions.ts#L94)

**Parameters:**

▪ **args**: *object*

| Name   | Type                                                                                     |
| ------ | ---------------------------------------------------------------------------------------- |
| `type` | [PermissionGroupType](/polymesh-sdk-api-reference/docs-v10/enums/permissiongrouptype.md) |

**Returns:** *Promise‹*[*KnownPermissionGroup*](/polymesh-sdk-api-reference/docs-v10/classes/knownpermissiongroup.md)*›*

### getGroups

▸ **getGroups**(): *Promise‹object›*

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:126*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/Permissions.ts#L126)

Retrieve all Permission Groups of this Security Token

**Returns:** *Promise‹object›*

### inviteAgent

▸ **inviteAgent**(`args`: [InviteExternalAgentParams](/polymesh-sdk-api-reference/docs-v10/interfaces/inviteexternalagentparams.md), `opts?`: [ProcedureOpts](/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue.md)*‹void››*

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:73*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/Permissions.ts#L73)

Invite an Identity to be an Agent with permissions over this Security Token

**`note`** this method is of type [ProcedureMethod](/polymesh-sdk-api-reference/docs-v10/interfaces/proceduremethod.md), which means you can call `inviteAgent.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                      |
| ------- | --------------------------------------------------------------------------------------------------------- |
| `args`  | [InviteExternalAgentParams](/polymesh-sdk-api-reference/docs-v10/interfaces/inviteexternalagentparams.md) |
| `opts?` | [ProcedureOpts](/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts.md)                         |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue.md)*‹void››*

### removeAgent

▸ **removeAgent**(`args`: [RemoveExternalAgentParams](/polymesh-sdk-api-reference/docs-v10/interfaces/removeexternalagentparams.md), `opts?`: [ProcedureOpts](/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue.md)*‹void››*

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:83*](https://github.com/PolymathNetwork/polymesh-sdk/blob/959efb76/src/api/entities/SecurityToken/Permissions.ts#L83)

Revoke an Agent's permissions for this Security Token

**`note`** this method is of type [ProcedureMethod](/polymesh-sdk-api-reference/docs-v10/interfaces/proceduremethod.md), which means you can call `removeAgent.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name    | Type                                                                                                      |
| ------- | --------------------------------------------------------------------------------------------------------- |
| `args`  | [RemoveExternalAgentParams](/polymesh-sdk-api-reference/docs-v10/interfaces/removeexternalagentparams.md) |
| `opts?` | [ProcedureOpts](/polymesh-sdk-api-reference/docs-v10/interfaces/procedureopts.md)                         |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-v10/classes/transactionqueue.md)*‹void››*
