apache/superset · error · AlertQueryError
Alert query failed the authorization check
Error message
Alert query failed the authorization check
What it means
Error "Alert query failed the authorization check" thrown in apache/superset.
Source
Thrown at superset/commands/report/alert.py:247
user = security_manager.find_user(username)
# A deleted/disabled executor user makes find_user return None. Raise
# the dedicated error so the handler below re-surfaces it instead of
# masking it as an opaque AlertQueryError (or letting the missing user
# surface as a NoneType error from the downstream auth flow).
if user is None:
raise ReportScheduleExecutorNotFoundError(username)
with override_user(user):
# Run table-level authorization as the executing user against
# the rendered SQL.
try:
security_manager.raise_for_access(
database=self._report_schedule.database,
sql=rendered_sql,
force_dataset_match=True,
)
except SupersetSecurityException as ex:
raise AlertQueryError(
message=_("Alert query failed the authorization check")
) from ex
start = default_timer()
df = self._report_schedule.database.get_df(sql=limited_rendered_sql)
stop = default_timer()
logger.info(
"Query for %s took %.2f ms",
self._execution_id,
(stop - start) * 1000.0,
)
return df
except SoftTimeLimitExceeded as ex:
logger.warning("A timeout occurred while executing the alert query: %s", ex)
raise AlertQueryTimeout() from ex
except ReportScheduleExecutorNotFoundError:
# A missing executor user is a configuration problem, not a transient
# query error; surface the typed error rather than masking it.
raiseView on GitHub (pinned to f4587218dd)
Solutions
- Grant the schedule executor user access to the database/datasource used by the alert query.
- Review row-level security rules applied to the executor user.
When it happens
Trigger: The alert query fails the datasource authorization check for the executor user.
Common situations: Executing an alert when the schedule owner lacks access to the underlying datasource.
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/880a4e073dcda1f7.
Report an issue: GitHub.