apache/superset · error · ImportFailedError
Dashboard doesn't exist and user doesn't have permission to
Error message
Dashboard doesn't exist and user doesn't have permission to create dashboards
What it means
ImportFailedError("Dashboard doesn't exist and user doesn't have permission to create dashboards") is raised in the v1 import path when no existing dashboard matches the bundle's UUID and the importer lacks can_write (dashboard create/import permission). Importing a new dashboard is a create operation, so the role must carry dashboard write permission.
Source
Thrown at superset/commands/dashboard/importers/v1/utils.py:427
# OVERWRITE path — existing alive row. Without ``overwrite`` or
# write permission, return it unchanged (the pre-soft-delete
# overwrite-without-permission behaviour).
if not overwrite or not can_write:
return existing
if user and (
not security_manager.can_access_dashboard(existing)
or (
not security_manager.is_editor(existing)
and not security_manager.is_admin()
)
):
raise ImportFailedError(
"A dashboard already exists and user doesn't have "
"permissions to overwrite it"
)
config["id"] = existing.id
elif not can_write:
raise ImportFailedError(
"Dashboard doesn't exist and user doesn't "
"have permission to create dashboards"
)
# TODO (betodealmeida): move this logic to import_from_dict
config = config.copy()
# removed in https://github.com/apache/superset/pull/23228
if "metadata" in config and "show_native_filters" in config["metadata"]:
del config["metadata"]["show_native_filters"]
# Note: theme_id handling moved to higher level import logic
for key, new_name in JSON_KEYS.items():
if config.get(key) is not None:
value = config.pop(key)
try:
config[new_name] = json.dumps(value)View on GitHub (pinned to f4587218dd)
Solutions
- Grant the importing role 'can_write' (import) permission on Dashboards via Security -> Role editing.
- Run the import under an account that already has dashboard-creation rights (e.g. Admin or a Curator role).
- If creation should be centralized, route bundle imports through a service account with exactly dashboard can_write and nothing more.
Example fix
# before
client.post('/api/v1/dashboard/import/', ...) # viewer role, new UUID -> 403-equivalent
# after
# assign role with can_write on Dashboard to the importing user, then
client.post('/api/v1/dashboard/import/', files={'formData': open('dash.zip', 'rb')}) Defensive patterns
Strategy: validation
Validate before calling
existing = find_existing_for_import(Dashboard, config['uuid'])
if existing is None and not security_manager.can_access('can_write', 'Dashboard'):
raise PermissionError('importing a new dashboard requires can_write on Dashboard') Try / catch
try:
run_import(bundle)
except ImportFailedError as ex:
if "permission to create dashboards" in str(ex):
grant_can_write_or_run_as_admin() Prevention
- Provision import service accounts with Dashboard can_write.
- Verify the role's permission matrix before first import into a new environment.
- Remember: new-UUID imports are creates and always need create rights.
When it happens
Trigger: Uploading a v1 dashboard ZIP for a UUID not present in the target instance, using a role without can_write/can_import on Dashboard (e.g. a viewer or dashboard-reader role).
Common situations: Sharing dashboard bundles with analysts whose roles only grant read access; import service accounts provisioned with minimal permissions; attempting first-time import into a fresh environment before granting the pipeline account creator rights.
Related errors
- User doesn't have permission to create or update datasets
- Cannot convert node type: ${node.type}
- Dashboard was deleted and re-import requires can_write permi
- A dashboard already exists and user doesn't have permissions
- A dashboard already exists and user doesn't have permissions
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/d457196d72e292ef.
Report an issue: GitHub.