> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GRANT Function (UDF/UDTF) Permission

<a id="sql-security-priv-mgmt-udf-grant" />

[Function permissions](/content/security/sec_concepts#security-concepts-permissions-function),
which allow management of [UDFs/UDTFs](/content/sql/udf#sql-udf), can be granted
directly to [users](/content/security/sec_concepts#security-concepts-users) or
[roles](/content/security/sec_concepts#security-concepts-roles).

```sql title="GRANT Function (UDF/UDTF) Permission Syntax" theme={null}
GRANT <EXECUTE | ADMIN> [PRIVILEGES]
ON <ALL FUNCTIONS | FUNCTION < <function name> | * >>
TO <user name | role name> [WITH GRANT OPTION]
```

```sql title="GRANT Create Function (UDF/UDTF) Permission Syntax" theme={null}
GRANT CREATE FUNCTION [PRIVILEGES]
TO <user name | role name> [WITH GRANT OPTION]
```

| Permission | Description |
| - | - |
| `ADMIN` | Drop the given *UDF*, and display full configuration about it (includes `EXECUTE` access). <br /> <br /> When `*` is used instead of *function name*, gives permission to manage [Python UDF function environments](/content/sql/udf/create-function-environment#sql-create-function-environment). |
| `EXECUTE` | Run and terminate the given *UDF*, and display limited configuration about it. |
| `<function reference>` | The name of the UDF/UDTF to which access is being granted, or `*` for all functions.  The following forms are valid: <br /> <br /> *\<function name>*: The specified UDF/UDTF <br /> <br /> `*`: All functions, both existing and future |
| `CREATE FUNCTION` | [Create UDF/UDTF permission](/content/security/sec_concepts#proc-create) |
| `WITH GRANT OPTION` | Grant this permission with a [grant option](/content/security/sec_concepts#security-concepts-permissions-grant-option) to grant it to others. |

## Examples

To grant execute on the **udf\_sos\_py\_proc** *UDF* to **udf\_user**:

```sql GRANT Function Execute Permission Example theme={null}
GRANT EXECUTE ON FUNCTION UDF_SOS_PY_PROC TO udf_user
```

To grant administrative access on every existing & future *UDF*, as well as the
ability to manage Python UDF environments, to **udf\_user**:

```sql GRANT Function Administrative Permission Example theme={null}
GRANT ADMIN ON FUNCTION * TO udf_user
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.