# 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-v9/classes/securitytoken.md)›

  ↳ **Permissions**

## Index

### Properties

* [context](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#protected-context)
* [parent](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#protected-parent)
* [portfolios](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#portfolios)
* [tokens](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#tokens)
* [transactionGroups](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#transactiongroups)
* [transactions](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#transactions)

### Methods

* [createGroup](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#creategroup)
* [getAgents](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#getagents)
* [getGroups](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#getgroups)
* [inviteAgent](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#inviteagent)
* [removeAgent](/polymesh-sdk-api-reference/docs-v9/classes/permissions.md#removeagent)

## Properties

### `Protected` context

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

*Inherited from void*

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

### `Protected` parent

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

*Inherited from void*

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

### portfolios

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

*Defined in* [*src/types/index.ts:749*](https://github.com/PolymathNetwork/polymesh-sdk/blob/56921667/src/types/index.ts#L749)

### tokens

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

*Defined in* [*src/types/index.ts:735*](https://github.com/PolymathNetwork/polymesh-sdk/blob/56921667/src/types/index.ts#L735)

Security Tokens over which this key has permissions

### transactionGroups

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

*Defined in* [*src/types/index.ts:747*](https://github.com/PolymathNetwork/polymesh-sdk/blob/56921667/src/types/index.ts#L747)

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-v9/interfaces/transactionpermissions.md) *| null*

*Defined in* [*src/types/index.ts:739*](https://github.com/PolymathNetwork/polymesh-sdk/blob/56921667/src/types/index.ts#L739)

Transactions this key can execute

## Methods

### createGroup

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

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:60*](https://github.com/PolymathNetwork/polymesh-sdk/blob/56921667/src/api/entities/SecurityToken/Permissions.ts#L60)

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-v9/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-v9/interfaces/creategroupparams.md) |
| `opts?` | [ProcedureOpts](/polymesh-sdk-api-reference/docs-v9/interfaces/procedureopts.md)         |

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

### getAgents

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

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:124*](https://github.com/PolymathNetwork/polymesh-sdk/blob/56921667/src/api/entities/SecurityToken/Permissions.ts#L124)

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-v9/interfaces/agentwithgroup.md)*\[]›*

### getGroups

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

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:87*](https://github.com/PolymathNetwork/polymesh-sdk/blob/56921667/src/api/entities/SecurityToken/Permissions.ts#L87)

Retrieve all group permissions of the Security Token

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

### inviteAgent

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

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:70*](https://github.com/PolymathNetwork/polymesh-sdk/blob/56921667/src/api/entities/SecurityToken/Permissions.ts#L70)

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-v9/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-v9/interfaces/inviteexternalagentparams.md) |
| `opts?` | [ProcedureOpts](/polymesh-sdk-api-reference/docs-v9/interfaces/procedureopts.md)                         |

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

### removeAgent

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

*Defined in* [*src/api/entities/SecurityToken/Permissions.ts:80*](https://github.com/PolymathNetwork/polymesh-sdk/blob/56921667/src/api/entities/SecurityToken/Permissions.ts#L80)

Revoke an Agent's permissions for this Security Token

**`note`** this method is of type [ProcedureMethod](/polymesh-sdk-api-reference/docs-v9/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-v9/interfaces/removeexternalagentparams.md) |
| `opts?` | [ProcedureOpts](/polymesh-sdk-api-reference/docs-v9/interfaces/procedureopts.md)                         |

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


---

# 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://developers.polymath.network/polymesh-sdk-api-reference/docs-v9/classes/permissions.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.
