# List Tag Providers

**URL:** <https://forum.inductiveautomation.com/t/list-tag-providers/27722>\
**Category:** Module Development\
**Tags:** ignition80\
**Created:** [August 23, 2019, 3:30pm UTC](https://forum.inductiveautomation.com/t/list-tag-providers/27722 "2019-08-23T15:30:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [August 23, 2019, 3:30pm UTC](https://forum.inductiveautomation.com/t/list-tag-providers/27722/1 "2019-08-23T15:30:34Z")

</div>

I am attempting to create user-selectable list of tag providers.  
`
private List getProviderList() {
List result = new ArrayList<>();
GatewayContext context = ApplicationInstallerGatewayHook.getInstance().getContext();
GatewayNetworkManager netmgr = context.getGatewayAreaNetworkManager();
ServerId metro = netmgr.getServerAddress(); // Local gateway
TagProviderService tps = (TagProviderService)netmgr.getServiceManager().getService(metro, TagProviderService.class);
List providerNames = tps.getProviders();
for( String name:providerNames) {
result.add(tps.getInformation(name));
}
return result;
}
`

But I get an exception on the line with italics:  
`
java.lang.ClassCastException: class com.inductiveautomation.metro.impl.services.ServiceManagerImpl$ServerWrapper$ServerService cannot be cast to class com.inductiveautomation.ignition.gateway.sqltags.distributed.TagProviderService (com.inductiveautomation.metro.impl.services.ServiceManagerImpl$ServerWrapper$ServerService and com.inductiveautomation.ignition.gateway.sqltags.distributed.TagProviderService are in unnamed module of loader ‘app’)
`

Thanks in advance,  
— chuck

---

<div class="post-metadata">

**Author:** ![mgross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mgross/32/3311_2.png) [@mgross](https://forum.inductiveautomation.com/u/mgross)\
**Post date:** [August 23, 2019, 5:50pm UTC](https://forum.inductiveautomation.com/t/list-tag-providers/27722/2 "2019-08-23T17:50:06Z")

</div>

I am guessing that you are trying to list tag providers from a remote gateway via the gateway network. You didn’t specify 7.9 or 8.0, so I’ll post both examples here.

7.9, where the remote machine is named “agent-7-ide-8088”:

```auto
        GatewayAreaNetworkManager gm = context.getGatewayContext().getGatewayAreaNetworkManager();
        Collection<ConnectionWatcher> connections = gm.getAvailableConnections();
        // We need the ServerId of the remote machine to be able to call the service on it.
        ServerId remoteServerId = null; 
        for (ConnectionWatcher conn : connections) {
            if (conn.getRemoteServerAddress().getServerName().equals("agent-7-ide-8088")) {
                remoteServerId = conn.getRemoteServerAddress();
                break;
            }
        }
        ServiceManager sm = gm.getServiceManager();
        List<String> remoteProviders = sm.getService(remoteServerId, TagProviderService.class).get().getProviders();

```

8.0, where the remote machine is named “agent-ide-8088”:

```auto
GatewayNetworkManager gm = context.getGatewayContext().getGatewayAreaNetworkManager();
        Collection<ConnectionWatcher> connections = gm.getAvailableConnections();
        // We need the ServerId of the remote machine to be able to call the service on it.
        ServerId remoteServerId = null;
        for (ConnectionWatcher conn : connections) {
            if (conn.getRemoteServerAddress().getServerName().equals("agent-ide-8088")) {
                remoteServerId = conn.getRemoteServerAddress();
                break;
            }
        }
        ServiceManager sm = gm.getServiceManager();
        List<String> remoteProviders = sm.getService(remoteServerId, TagProviderService2.class).get().getProviders();

```

Hopefully that helps.

---

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [August 23, 2019, 6:39pm UTC](https://forum.inductiveautomation.com/t/list-tag-providers/27722/3 "2019-08-23T18:39:37Z")

</div>

Thanks for the quick response.  
This is for Ignition 8. I’m trying to list the TagProviderMeta values for the providers on my local gateway. In 7.9 I could use context.getTagManager().getTagInformation().  
My gm.getAvailableConnections() returns an empty list.

— chuck

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 23, 2019, 6:55pm UTC](https://forum.inductiveautomation.com/t/list-tag-providers/27722/4 "2019-08-23T18:55:54Z")

</div>

It looks like you would call

```auto
        List<TagProvider> tagProviders = context.getTagManager().getTagProviders();
        for (TagProvider tagProvider : tagProviders) {
            TagProviderProps tagProviderProps = tagProvider.getPropertiesAsync().get();
        }

```

to fetch the information locally

---

<div class="post-metadata">

**Author:** ![chuckcoughlin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@chuckcoughlin](https://forum.inductiveautomation.com/u/chuckcoughlin)\
**Post date:** [August 23, 2019, 7:22pm UTC](https://forum.inductiveautomation.com/t/list-tag-providers/27722/5 "2019-08-23T19:22:03Z")

</div>

… that’s it. Thanks much.

---

<div class="post-metadata">

**Author:** ![Lynn\_Martineau](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Lynn\_Martineau](https://forum.inductiveautomation.com/u/Lynn_Martineau)\
**Post date:** [December 18, 2025, 10:32pm UTC](https://forum.inductiveautomation.com/t/list-tag-providers/27722/6 "2025-12-18T22:32:06Z")

</div>

If anyone is still looking for this it’s easy with system.tag.browse.

```python
allProviders = system.tag.browse('')
for provider in allProviders:
    print provider

```
