GitHub user dosubot[bot] added a comment to the discussion: How to get permission id for datasource access on specific dataset using Superset 5.0.0 endpoint?
<!-- Answer --> This is expected behavior in Superset 5.0.0, not a bug. The `/api/v1/security/permissions-resources/` endpoint returns permissions like `can_read` and `can_write` on objects such as `Dataset`, `Chart`, and `Dashboard`, but does not expose `datasource_access` permissions for individual datasets via the API by default. These object-level permissions (`datasource_access` with a view_menu like `[database].[table](id:id)`) are managed internally and are only created or visible after certain backend events (like dataset access or a permissions sync), not eagerly or via the REST API. If you need to automate dataset permission assignments, you may need to trigger a permissions sync from the admin UI or use backend scripts, as the REST API does not fully support dynamic object-level permission assignment for datasets in 5.0.0. Your code will not find `datasource_access` entries in the API response unless those permissions have been materialized in the backend [[source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/manager.py)] [[discussion](https://github.com/apache/superset/discussions/33878)]. For most API-based workflows, you should use the available CRUD permissions (`can_read`, `can_write`) on `Dataset` or manage fine-grained access via the admin UI or backend scripts. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/c9607ff7-112a-42e4-be91-f1d21d6f31d0?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c9607ff7-112a-42e4-be91-f1d21d6f31d0?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c9607ff7-112a-42e4-be91-f1d21d6f31d0?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c9607ff7-112a-42e4-be91-f1d21d6f31d0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c9607ff7-112a-42e4-be91-f1d21d6f31d0?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c9607ff7-112a-42e4-be91-f1d21d6f31d0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c9607ff7-112a-42e4-be91-f1d21d6f31d0?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34571) GitHub link: https://github.com/apache/superset/discussions/34571#discussioncomment-14017646 ---- This is an automatically sent email for notifications@superset.apache.org. To unsubscribe, please send an email to: notifications-unsubscr...@superset.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org