# Module TagProvider vs ManagedTagProvider

**URL:** <https://forum.inductiveautomation.com/t/module-tagprovider-vs-managedtagprovider/102291>\
**Category:** Module Development\
**Created:** [February 13, 2025, 4:59am UTC](https://forum.inductiveautomation.com/t/module-tagprovider-vs-managedtagprovider/102291 "2025-02-13T04:59:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harry\_Sadoyan](https://avatars.discourse-cdn.com/v4/letter/h/50afbb/32.png) [@Harry\_Sadoyan](https://forum.inductiveautomation.com/u/Harry_Sadoyan)\
**Post date:** [February 13, 2025, 4:59am UTC](https://forum.inductiveautomation.com/t/module-tagprovider-vs-managedtagprovider/102291/1 "2025-02-13T04:59:41Z")

</div>

In my ignition module I was able to get basic reads and writes working by creating a TagProvider (with an empty Security context for testing). Based off the example in the [sdk docs](https://www.sdk-docs.inductiveautomation.com/docs/appendix/tag-examples/read-and-write-tags/)

But then I saw that the github [sdk example](https://github.com/inductiveautomation/ignition-sdk-examples/blob/9ba2194dcd9d5f95f302e6c7abca4904d0f734d3/managed-tag-provider) is using a ManagedTagProvider instead.

From @Kevin.Herron's reply on an [older post](https://forum.inductiveautomation.com/t/type-of-tagproviders-managed-or-standard-what-is-diffrences/65904) it seems ManagedTagProvider is the recommended way to do it? If I already have the basics working with TagProvider is it worth pivoting now? I don't want to run into issues down the line from doing something unsupported.

There's an added caveat that the I'll need to be updating a dozen or so tags simultaneously, and the TagProvider supports that with `writeAsync`. ManagedTagProvider seems to only support a singular `updateValue` at a time.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 13, 2025, 12:41pm UTC](https://forum.inductiveautomation.com/t/module-tagprovider-vs-managedtagprovider/102291/2 "2025-02-13T12:41:13Z")

</div>

You should not be using `.writeAsync` to deliver data to tags from **inside** your module. That method is for **users** of your data to write **into** your module.

The ManagedTagProvider is structured to make it easy for module developers to provide the inside data supply. If you implement the `TagProvider` interface, you are entirely on your own.

---

<div class="post-metadata">

**Author:** ![Harry\_Sadoyan](https://avatars.discourse-cdn.com/v4/letter/h/50afbb/32.png) [@Harry\_Sadoyan](https://forum.inductiveautomation.com/u/Harry_Sadoyan)\
**Post date:** [February 13, 2025, 8:22pm UTC](https://forum.inductiveautomation.com/t/module-tagprovider-vs-managedtagprovider/102291/3 "2025-02-13T20:22:19Z")

</div>

I didn't have to implement the interface myself. From the GatewayTagManager I was able to `getTagProvider()` and use an existing implementation.

ManagedTagProvider has `updateValues`, but I don't see a way to read tags into the module. Is there a different interface to use for that?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 13, 2025, 8:33pm UTC](https://forum.inductiveautomation.com/t/module-tagprovider-vs-managedtagprovider/102291/4 "2025-02-13T20:33:28Z")

</div>

So... you didn't actually create a TagProvider then?

You just got ahold of an existing one and used it to read or write to its tags.

Which is fine, but it's not _creating_ a TagProvider.

---

<div class="post-metadata">

**Author:** ![Harry\_Sadoyan](https://avatars.discourse-cdn.com/v4/letter/h/50afbb/32.png) [@Harry\_Sadoyan](https://forum.inductiveautomation.com/u/Harry_Sadoyan)\
**Post date:** [February 13, 2025, 8:40pm UTC](https://forum.inductiveautomation.com/t/module-tagprovider-vs-managedtagprovider/102291/5 "2025-02-13T20:40:36Z")

</div>

Oh no, I didn't implement a new one. That was confusing wording on my part.

I got an instance of (something that implements) TagProvider from the GatewayTagManager.

From the GatewayHook's `setup` I took the GatewayContext and then called  
` context.getTagManager().getTagProvider(TAG_PROVIDER);`

It works for me now, but I don't want to leave landmines for myself to step on later by using an unsupported interface.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 13, 2025, 8:41pm UTC](https://forum.inductiveautomation.com/t/module-tagprovider-vs-managedtagprovider/102291/6 "2025-02-13T20:41:28Z")

</div>

This is fine.

Creating your own TagProvider (using ManagedTagProvider) is an entirely different thing that looks like it may irrelevant for you.

---

<div class="post-metadata">

**Author:** ![Harry\_Sadoyan](https://avatars.discourse-cdn.com/v4/letter/h/50afbb/32.png) [@Harry\_Sadoyan](https://forum.inductiveautomation.com/u/Harry_Sadoyan)\
**Post date:** [February 13, 2025, 8:42pm UTC](https://forum.inductiveautomation.com/t/module-tagprovider-vs-managedtagprovider/102291/7 "2025-02-13T20:42:45Z")

</div>

Got it. Thank you!
