Overview
Formal integrates with Business Intelligence applications to enable end-user identity propagation. This ensures that queries from BI tools are attributed to the actual end-user rather than a shared machine user, enabling accurate auditing and per-user policy enforcement.How It Works
When you set up a BI integration:- Sync: The BI sync worker, running in your infrastructure, fetches user identities from your BI application. You can also map users by hand
- Map: Each BI user’s ID is assigned as an external ID to the matching Formal user
- Propagate: When BI tool users execute queries, their identity is passed to the Connector
- Enforce: Policies evaluate based on the end-user, not the BI tool’s machine user
Supported BI Applications

- Metabase
- Looker
- Omni
- Fivetran
- Custom applications (via SQL commenter)
Setup
Metabase
Navigate to BI Integrations
Add Integration
Select Metabase
Create the integration
Run the sync worker
FORMAL_API_KEY: a Formal API keyMETABASE_BI_INTEGRATION_ID: the integration’s IDMETABASE_HOSTNAMEandMETABASE_VERSIONMETABASE_USERNAMEandMETABASE_PASSWORDfor a Metabase admin, orMETABASE_USE_API_KEY=trueandMETABASE_API_KEYFREQUENCY, for example1h, to keep syncing. Without it, the worker syncs once and exits.
Terraform
formal_integration_bi.metabase.id to the worker as
METABASE_BI_INTEGRATION_ID.
Looker
Looker supports end-user identity propagation via JDBC connection parameters.Open Database Connection
Edit Connection
Add Parameter
Save
Omni
Omni supports connecting to Snowflake through the Formal Connector using a host override. Unlike other BI tools that embed end-user identity in SQL comments, Omni propagates identity at session login time via theQUERY_TAG session parameter containing the omniOrganizationUserId.
Connection Setup
Add a Snowflake Connection
Choose Host & Port
Configure Host Override
account.<connector-hostname>, where <connector-hostname> is your Formal connector hostname. For example:account. prefix is required for the connector to correctly route Snowflake requests.Set Port
1443).Set Database and Warehouse
Configure Authentication
SNOWFLAKE_JWT):- Select Key Pair Authentication as the authentication type
- Set the Username to your Formal machine user (e.g.,
idp:formal:machine:omni) - Add a keypair using the private key available via the Download Private Key button on the machine user details page in the Control Plane
Test Connection
End-User Identity Setup
Create Omni Integration
Map External IDs
omniOrganizationUserId in Omni.Verify
Fivetran
Connect Fivetran to monitor data pipelines.Navigate to BI Integrations
Add Integration
Select Fivetran
Enter Credentials
- Name: A name for the integration
- API Key: Your Fivetran API key
- API Secret: Your Fivetran API secret
Custom Applications
For internal applications or custom BI tools, use the formal-sqlcommenter library to propagate end-user identity.Python/Django
Install the package:Configuring External IDs
External IDs map end-users in external systems to Formal users.Create Formal User
Map External ID
12345, map 12345 to Katie’s
Formal user.Verify
Automatic Sync
For Metabase and Omni, the BI sync worker runs in your infrastructure and:- Fetches user lists from the BI application
- Matches them to Formal users by email
- Assigns external IDs
FREQUENCY so users added to the BI tool later are mapped too.
Policy Examples
End-User Access Control
Per-User Data Masking
Audit BI Tool Access
Monitoring
View End-User Attribution
- Navigate to Logs
- Filter by machine user (BI tool)
- Check “End User” column to see attributed end-users
- Verify queries are attributed correctly
Session Details
In Sessions, you’ll see:- User: Machine user (BI tool)
- End-User: Actual human user in the BI tool
- Queries: Full query history with end-user attribution
Troubleshooting
Queries not attributed to end-users
Queries not attributed to end-users
- BI integration not set up
- External IDs not mapped
- BI tool not passing end-user information
- Verify the BI integration is active in the Control Plane
- On the Formal user → External Connections, confirm the external ID matches the BI tool user ID
- For Looker, verify JDBC parameters are configured
- Review Connector logs for end-user extraction errors
Metabase sync not working
Metabase sync not working
- The sync worker isn’t running, or ran once and exited because
FREQUENCYisn’t set - Incorrect Metabase credentials or API key in the worker’s environment
METABASE_BI_INTEGRATION_IDdoesn’t match the integration in Formal- The worker can’t reach Metabase or Formal
- Check the worker’s logs for authentication or connection errors
- Verify the Metabase credentials the worker uses
- Confirm
METABASE_BI_INTEGRATION_IDis the integration’s ID - Make sure the worker’s network can reach Metabase and the Formal API
Policies not evaluating for end-users
Policies not evaluating for end-users
- Policy references
input.userinstead ofinput.end_user - End-user not in expected groups
- Update policies to use
input.end_userfor BI tool queries - Verify end-user’s group memberships in Control Plane
- Test policy in dry-run mode and review logs
Best Practices
Always Use End-User Policies
Always Use End-User Policies
input.end_user attributes, not
input.user (which is the machine user).Implement Row-Level Security
Implement Row-Level Security
Audit BI Access
Audit BI Access
Sync Regularly
Sync Regularly
FREQUENCY
set. For other BI tools and custom apps, update external IDs when users
are added or removed.