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

[Function permissions](https://docs.kinetica.com/content/security/sec_concepts.md#security-concepts-permissions-function),
which allow management of [UDFs/UDTFs](https://docs.kinetica.com/content/sql/udf.md#sql-udf), can be granted
directly to [users](https://docs.kinetica.com/content/security/sec_concepts.md#security-concepts-users) or
[roles](https://docs.kinetica.com/content/security/sec_concepts.md#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).   When `*` is used instead of *function name*, gives permission to manage [Python UDF function environments](https://docs.kinetica.com/content/sql/udf/create-function-environment.md#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:   *\<function name>*: The specified UDF/UDTF   `*`: All functions, both existing and future |
| `CREATE FUNCTION` | [Create UDF/UDTF permission](https://docs.kinetica.com/content/security/sec_concepts.md#proc-create) |
| `WITH GRANT OPTION` | Grant this permission with a [grant option](https://docs.kinetica.com/content/security/sec_concepts.md#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.