Overview
This page covers how to create and manage identities in Formal. There are two types of identities in Formal:- Users: Individual human or machine identities
- Groups: Collections of users for streamlined permission management
Native Users are not identities: Native users are a separate concept from identities.
While identities (users and groups) represent who is accessing resources through Formal, native users hold
the credentials Connectors use to authenticate to the underlying resources (databases, servers, etc.).
To learn more about native users, refer to our Native Users documentation.
Users
Users represent identities that connect to resources through Formal Connectors. Every query, command, or API call can be attributed to a specific user for auditing and policy enforcement.User Types
- Human Users
- Machine Users
Human Users are for employees who need direct access to protected resources.
They can be invited manually but often organisation provision those users via SCIM or SSO (Formal supports JIT provisioning via SSO).
They can then retrieve their username and access token from the Formal console to connect through Connectors.
Use cases:
- Engineers querying production databases
- Analysts accessing data warehouses
- DevOps teams managing infrastructure via SSH
Creating Users
1
Navigate to Users
Go to Users in the Formal console
2
Click New User
Select New User button
3
Select Identity Type
Choose Human or Machine
4
Provide user information
- Name: Full name or application name - Email: For human users (receives credentials) - Temporary: (Optional) Set expiration time for temporary access - Groups: (Optional) Add to groups
Access Tokens
Formal decouples credentials from underlying resources, enabling each user to have their own set of short-lived, rotating credentials.Default Validity Period
14 days - Access tokens automatically expire and must be refreshed.Configuring Token Validity
To adjust the validity period for your organization, contact Formal support. Organization administrators are authorized to make this request.Accessing Formal Credentials
- Web Console
- Desktop App
- Navigate to the Formal console
- Click the Access Token button in the bottom right corner
- Copy your credentials (username and access token)

Passing Formal Credentials
Connect to resources using your Formal credentials:Using Hashed Access Tokens
Some database clients have limitations with password length. For example, the standardmysql and mariadb CLI clients don’t support passwords longer than 80 characters when using the -p (interactive password) option. Since Formal access tokens typically exceed this limit, you’ll need to use hashed tokens instead.
What are hashed tokens?
Hashed tokens are shortened versions of your full access tokens that are compatible with clients that have password length restrictions. They maintain the same security properties while working within these constraints.
How to obtain a hashed token:
- Navigate to the Formal console
- Click the Access Token button in the bottom right corner
- Click on Hashed Access Token to view your hashed token
- Copy the hashed token for use with restricted clients
- MySQL/MariaDB CLI clients with the
-pflag - Other database clients that limit password length
- Legacy applications with password field restrictions
Using End User Identities
There may be times where a machine identity interacting with the Connector is itself making requests on behalf of end users. For example, you may want to control access to a Retool dashboard. Various technologies support the notion of end user identities where the machine user can map a request to a separate Formal user identity. For more information on how to specify the end user, refer to the resource page for that particular technology.End user identities do not require the machine identity to have access to the end user identity’s access token. As a result,
when looking at end user identities, the machine identity needs to be trusted when writing policies against end users.
1
Add External ID to Human User
Map the user’s ID in your BI tool (e.g., Looker user ID 12345) to their
Formal user
2
Configure your application
Update your application to propagate the end-user ID when connecting through
Formal Formal provides SDKs to simplify this:
- formal-sqlcommenter for Python/Django
- Built-in integrations for Metabase, Looker, and more
3
Verify attribution
Check Logs to confirm queries are
attributed to the correct end user
Groups
Groups allow you to apply policies and native user assignments to multiple users simultaneously, streamlining permission management.Simplify Policy Management
Write policies once for a group instead of per-user
Consistent Access
Ensure all group members have the same permissions
Native User Mapping
Assign database credentials at the group level
Flexible Membership
Users can belong to multiple groups
Creating Groups
1
Navigate to Groups
Go to Groups in the Formal console
2
Click New Group
Create a new group
3
Name the group
Choose a descriptive name (e.g., “Engineering Team”, “Analytics”, “External
Contractors”)
4
Add members
Select users to add to the group
Managing Group Membership
1
Open group details
Click on a group in the Groups list
2
Add or remove users
Select users from the dropdown to add them, or remove existing members
A user can be part of multiple groups. Their effective permissions are the
union of all group policies plus any user-specific policies.
Best Practices
Use Groups for Team-Based Access
Use Groups for Team-Based Access
Create groups that match your organizational structure (teams, departments,
roles). This makes policy management scalable as your organization grows.
Leverage Temporary Users for Contractors
Leverage Temporary Users for Contractors
Set expiration dates for external contractors or time-limited access needs.
Formal automatically cleans up expired users.
Implement External IDs for BI Tools
Implement External IDs for BI Tools
Ensure end-user accountability even when using shared application credentials.
This is critical for compliance and security auditing.
Use Machine Users for Applications
Use Machine Users for Applications
Never share human user credentials with applications. Create dedicated machine
users for each application or service.
Minimize Direct User Assignments
Minimize Direct User Assignments
Prefer group-based native user assignments over individual assignments. This
reduces configuration complexity.
Configuration
Understanding Identities in Logs
Individual logs will specify which identity was used. If a formal identity was used, the resultinguser field will have user.type equal to formal. In addition,
user.formal will be populated with the identity. user.formal.type will specify whether the identity will be human or machine.
If a Formal identity is not specified, user.formal will be empty and user.type will be native.