# Perspective - Scripting - Get default provider for active project

**URL:** <https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [May 20, 2021, 6:02pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951 "2021-05-20T18:02:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [May 20, 2021, 6:02pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/1 "2021-05-20T18:02:21Z")

</div>

I’m on 8.1.5

Is there a way to get the default provider name for the active project ?

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [May 20, 2021, 6:05pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/2 "2021-05-20T18:05:55Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/6/96b065e000d8b5c4ffefb82187f723abf5bdb283.png)

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [May 20, 2021, 6:21pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/3 "2021-05-20T18:21:39Z")

</div>

Unable to read that tag in perspective

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/0/304efb186fe9d3125a9d893840f688689cfb17b4.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/a/cacc5ee878a3aae446303ac8097978ebb64c7a8a.png)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [May 20, 2021, 6:59pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/4 "2021-05-20T18:59:23Z")

</div>

Added the perspective tag to the post title.

Since you hadn’t specified, @jespinmartin1 pointed you to a client tag, which doesn’t exist in perspective. 😉

I’ll poke around a bit, unless someone already knows and chimes in before I get back.

---

<div class="post-metadata">

**Author:** ![Cory.grube](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cory.grube/32/20476_2.png) [@Cory.grube](https://forum.inductiveautomation.com/u/Cory.grube)\
**Post date:** [May 20, 2021, 7:05pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/5 "2021-05-20T19:05:22Z")

</div>

Running this in the client scope should get you your default provider:

`system.tag.getConfiguration('', False)[0]['path']`

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [May 20, 2021, 7:40pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/6 "2021-05-20T19:40:45Z")

</div>

Thanks, do what I want

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [May 20, 2021, 7:44pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/7 "2021-05-20T19:44:51Z")

</div>

> [@Cory.grube](#):
>
> system.tag.getConfiguration('', False)[0]['path']

Any tricks to get the list of all provider ?

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [May 20, 2021, 7:54pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/8 "2021-05-20T19:54:24Z")

</div>

ohh, since you asked for a default provider of project I assumed the non complicate answer.  
There is no such a good way to get the provider of a project in a session, we could write some script to .getDefaultProvider() at gateway scope but well need to specify the project name somewhere, which results complicate if you just use a static global prop at your session.  
I can advice you to create a session custom property with the name of the provider and make all your bindings using this.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/5/c5dbdf7b434593debe38328a1ac5677bbe582672.png)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [May 20, 2021, 8:47pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/9 "2021-05-20T20:47:38Z")

</div>

> [@luc.martin](#):
>
> Any tricks to get the list of all provider ?

` [provider['name'] for provider in system.tag.browse('')]`

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [May 20, 2021, 9:35pm UTC](https://forum.inductiveautomation.com/t/perspective-scripting-get-default-provider-for-active-project/46951/10 "2021-05-20T21:35:23Z")

</div>

Tanks
