# Enforce DQL query requirements

**URL:** <https://community.dynatrace.com/t/enforce-dql-query-requirements/53091>\
**Category:** Open Q&A\
**Tags:** user-management, permissions, logs\
**Created:** [August 25, 2025, 2:44pm UTC](https://community.dynatrace.com/t/enforce-dql-query-requirements/53091 "2025-08-25T14:44:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![calfanonerey](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@calfanonerey](https://community.dynatrace.com/u/calfanonerey)\
**Post date:** [August 25, 2025, 2:44pm UTC](https://community.dynatrace.com/t/enforce-dql-query-requirements/53091/1 "2025-08-25T14:44:38Z")

</div>

Is there a way in the platform where I can enforce that a query MUST contain the “bucket” parameter. For example, I want all non-admin users to utilize buckets and if they don’t they will not see any data. ie:

will show results:

fetch logs, bucket:{“my-service\_logs”}

will NOT show results:  
fetch logs

The end goal is to get people to utilize buckets to optimize queries

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [August 26, 2025, 1:24am UTC](https://community.dynatrace.com/t/enforce-dql-query-requirements/53091/2 "2025-08-26T01:24:37Z")

</div>

[@calfanonerey](https://community.dynatrace.com/user/91250)&nbsp;You can configure IAM policy permissions to limit user access to specific buckets , so they would only see the data from the buckets they have permissions to view.

> **[Permissions in Grail](https://docs.dynatrace.com/docs/platform/grail/organize-data/assign-permissions-in-grail)**
>
> Find out how to assign permissions to buckets and tables in Grail.

> **[IAM policy reference](https://docs.dynatrace.com/docs/manage/identity-access-management/permission-management/manage-user-permissions-policies/advanced/iam-policystatements)**
>
> Complete reference of IAM policies and corresponding conditions across all Dynatrace services.

---

<div class="post-metadata">

**Author:** ![calfanonerey](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@calfanonerey](https://community.dynatrace.com/u/calfanonerey)\
**Post date:** [August 26, 2025, 6:27pm UTC](https://community.dynatrace.com/t/enforce-dql-query-requirements/53091/3 "2025-08-26T18:27:37Z")

</div>

Thanks! But if I have a user with the assigned buckets and they do a fetch logs command they will just see the data for all the buckets they have access to right? Ideally I would want them to use the buckets parameter otherwise they should not see any data

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [August 26, 2025, 10:44pm UTC](https://community.dynatrace.com/t/enforce-dql-query-requirements/53091/4 "2025-08-26T22:44:47Z")

</div>

[@calfanonerey](https://community.dynatrace.com/user/91250)&nbsp;Right, they would see all buckets they have access to, not sure there is a way currently to enforce a rule at DQL query level.

This is an interesting option to have , you can open a idea and see if it gets through

For now, I think educating the end-users on the DQL best practices is the option (I know its not easy)
