Budibase/budibase · error
Audit logs not available - license required.
Error message
Audit logs not available - license required.
What it means
The audit log search function checks isAuditLogsEnabled(), which reflects the instance license. Audit log storage and querying are a paid feature; without the license the fetch throws instead of querying the audit store.
Source
Thrown at packages/pro/src/sdk/auditLogs/auditLogs.ts:115
const enrichedLog: AuditLogEnriched = {
event: log.event,
timestamp: log.timestamp,
name: log.name,
metadata: log.metadata,
user: user || deleted(log.userId, ResourceType.USER, log.fallback),
}
if (log.appId) {
enrichedLog.app =
workspace || deleted(log.appId, ResourceType.APP, log.fallback)
}
enriched.push(enrichedLog)
}
return enriched
}
export async function fetch(params: AuditLogSearchParams) {
if (!(await isAuditLogsEnabled())) {
throw new Error("Audit logs not available - license required.")
}
const filter: SearchFilters = await getSearchFilters(params)
if (typeof params.bookmark === "string") {
throw new Error("String based bookmark not supported.")
}
const response = await auditLogs.searchSQL(filter, params.bookmark)
return {
hasNextPage: response.hasNextPage,
bookmark: response.bookmark,
data: await enrich(response.rows),
}
}
// like the fetch, but without pagination (uses filtered replication)
export function download(params: AuditLogSearchParams): {View on GitHub (pinned to a81a902e9a)
Solutions
- Upgrade to a Budibase license that includes audit logs (enterprise/business tier).
- If already licensed, force a license refresh/re-sync so isAuditLogsEnabled() picks up the entitlement.
- Gate the audit log UI/API calls behind a license check so users see an upsell instead of an error.
- Check the account/license key configuration (ACCOUNT_TENANT_ID / license env) in self-hosted deployments.
Example fix
// before
const logs = await fetch(params)
// after
if (await isAuditLogsEnabled()) {
const logs = await fetch(params)
} else {
showUpgradePrompt()
} Defensive patterns
Strategy: try-catch
Validate before calling
const enabled = await isAuditLogsEnabled()
if (!enabled) throw new UpgradeRequired("Audit logs require an upgraded license") Type guard
function canUseAuditLogs(plan: Plan): boolean {
return plan.features.includes("auditLogs")
} Try / catch
try {
return await auditLogs.fetch(params)
} catch (e) {
if (e.message.includes("license required")) {
showUpgradePrompt("auditLogs")
} else throw e
} Prevention
- Check entitlements before rendering audit-log UI
- Keep the license key current and force entitlement re-sync after upgrades
- Centralize feature-gating checks so paid features degrade gracefully
When it happens
Trigger: Calling the audit log search API (GET /api/global/auditlogs or equivalent via sdk.auditLogs.fetch) with AuditLogSearchParams on an instance whose license does not include audit logs.
Common situations: Free/open-source self-hosted plan attempting to read audit logs; expired or downgraded license; license not yet synced to the running instance after upgrade; calling the API from custom tooling that assumes enterprise edition.
Related errors
- String based bookmark not supported.
- User does not have access to environment variables feature.
- FEATURE_DISABLED
- Error getting license: ${message}
- Invalid license key
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/654c6c11bf030e6d.
Report an issue: GitHub.