# Tags being set by a script appear as a manual tag, which means these tags can be deleted by users

**URL:** <https://community.dynatrace.com/t/tags-being-set-by-a-script-appear-as-a-manual-tag-which-means-these-tags-can-be-deleted-by-users/56195>\
**Category:** Open Q&A\
**Tags:** tagging, dynatrace-api\
**Created:** [June 16, 2026, 1:15pm UTC](https://community.dynatrace.com/t/tags-being-set-by-a-script-appear-as-a-manual-tag-which-means-these-tags-can-be-deleted-by-users/56195 "2026-06-16T13:15:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JannickDT\_CM](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@JannickDT\_CM](https://community.dynatrace.com/u/JannickDT_CM)\
**Post date:** [June 16, 2026, 1:15pm UTC](https://community.dynatrace.com/t/tags-being-set-by-a-script-appear-as-a-manual-tag-which-means-these-tags-can-be-deleted-by-users/56195/1 "2026-06-16T13:15:34Z")

</div>

We are not setting manual tags, we are setting tags in an automated way via scripting but they appear as manual tags in DT.&nbsp; So this means that our users can delete these manual tags.

Is there a workarround to prevent the deletion of these manual tags being set by scripts?

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [June 16, 2026, 3:30pm UTC](https://community.dynatrace.com/t/tags-being-set-by-a-script-appear-as-a-manual-tag-which-means-these-tags-can-be-deleted-by-users/56195/2 "2026-06-16T15:30:53Z")

</div>

Hi,

Can you check [Primary Grail fields and tags](https://docs.dynatrace.com/docs/shortlink/primary-tags)?

Best regards

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [June 16, 2026, 8:06pm UTC](https://community.dynatrace.com/t/tags-being-set-by-a-script-appear-as-a-manual-tag-which-means-these-tags-can-be-deleted-by-users/56195/3 "2026-06-16T20:06:22Z")

</div>

In Dynatrace Classic, you have:

- auto-tags, where you manage the rules, and Dynatrace tags the entities
- manual tags that you set manually in the UI or using API -&nbsp;[Custom tags API - POST tags — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/api-custom-tags-post)
- tags that you set using the environment variable [DT\_TAGS](https://docs.dynatrace.com/docs/shortlink/tagging-environment-variable)&nbsp;(applies to process) or [OneAgent](https://docs.dynatrace.com/docs/shortlink/tagging-hostautotag)&nbsp;(only applies to host)

In Dynatrace Gen3 you have:

- tags that you set using the environment variable [DT\_TAGS](https://docs.dynatrace.com/docs/shortlink/tagging-environment-variable)&nbsp;(applies to process) or [OneAgent](https://docs.dynatrace.com/docs/shortlink/tagging-hostautotag)&nbsp;(only applies to host)
- primary grail tags (grail fields named primary\_tags.\<tag\> for every signal emitted from the source) and also primary fields.

Based on your question, I’m assuming you use the API approach to tag the entities. If you are on Dynatrace SaaS, I suggest&nbsp;changing the approach to the&nbsp;[primary\_grail tags](https://docs.dynatrace.com/docs/shortlink/primary-tags)&nbsp;and maybe also tagging&nbsp;with DT\_TAGS / OneAgent if it fits your case (basically entity types).&nbsp; Manual and automatic tagging will be eventually removed in SaaS, AFAIK tags set using DT\_TAGS and OneAgent will not be removed.

Dynatrace Managed has the same tagging functionality as Dynatrace Classic and there are no changes planned.
