# System.Tag.Configure for tags at root level?

**URL:** <https://forum.inductiveautomation.com/t/system-tag-configure-for-tags-at-root-level/43198>\
**Category:** Ignition\
**Created:** [February 9, 2021, 6:21pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-for-tags-at-root-level/43198 "2021-02-09T18:21:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan123](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@dan123](https://forum.inductiveautomation.com/u/dan123)\
**Post date:** [February 9, 2021, 6:21pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-for-tags-at-root-level/43198/1 "2021-02-09T18:21:41Z")

</div>

Is it possible to use System.Tag.Configure on tags at the root/Provider level (i.e. tags that don’t reside in a folder)?

The code below is pretty much copied from the user manual – if path points to an actual folder, then this works. But when the path is “[default]” or “[]”, I get an error “The tag type ‘Provider’ cannot be created at this location.”, no matter how I set the basePath. The basePath is supposed to be the parent, but at the root level, there is no parent, so is this just a limitation of the script, or is there a way around it? (Besides just making sure all of the tags are organized in folders, which I try to do, but there’s one project where I can’t mess with their tag paths).

```auto
path = "[default]"

configs = system.tag.getConfiguration(path, True)
 
for tag in configs[0]['tags']:	
	if str(tag['tagType']) != 'Folder':
		tag['enabled'] = False

system.tag.configure("", configs, "m")

```

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [February 9, 2021, 6:52pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-for-tags-at-root-level/43198/2 "2021-02-09T18:52:29Z")

</div>

I suspect the `system.tag.configure` needs to know at least _which_ tag provider to write to from the first parameter. Try this:

```python
path = "[default]"

configs = system.tag.getConfiguration(path, True)
configs = configs[0]['tags']

for tag in configs:
	if str(tag['tagType']) != 'Folder':
		tag['enabled'] = False

system.tag.configure("[default]", configs, "m")

```

This version cuts off the top level from the configs returned, which only makes sense if we don’t intend to change the top-level item itself and we know there is only one item at the top level. Both of these things are true in this case since the top level is the `[default]` tag provider itself.

---

<div class="post-metadata">

**Author:** ![dan123](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@dan123](https://forum.inductiveautomation.com/u/dan123)\
**Post date:** [February 9, 2021, 8:14pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-for-tags-at-root-level/43198/3 "2021-02-09T20:14:06Z")

</div>

that worked great, thanks!
