# \[FEATURE-1478\] Get Profiles List (get all user sources)

**URL:** <https://forum.inductiveautomation.com/t/feature-1478-get-profiles-list-get-all-user-sources/11401>\
**Category:** Ignition\
**Created:** [March 22, 2016, 3:37pm UTC](https://forum.inductiveautomation.com/t/feature-1478-get-profiles-list-get-all-user-sources/11401 "2016-03-22T15:37:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amarth](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarth/32/3313_2.png) [@Amarth](https://forum.inductiveautomation.com/u/Amarth)\
**Post date:** [March 22, 2016, 3:37pm UTC](https://forum.inductiveautomation.com/t/feature-1478-get-profiles-list-get-all-user-sources/11401/1 "2016-03-22T15:37:54Z")

</div>

Hello all,

Is it possible to get a list of all UserProfiles (User Sources) available on a Gateway ?  
This list can be seen when trying to “Verify an Authentication Profile…” on the “Users,Roles” page on the Gateway.

I was wondering if it can be fetched on the client side.

Thank you.

---

<div class="post-metadata">

**Author:** ![harigobu.gb](https://avatars.discourse-cdn.com/v4/letter/h/b77776/32.png) [@harigobu.gb](https://forum.inductiveautomation.com/u/harigobu.gb)\
**Post date:** [December 11, 2020, 3:44pm UTC](https://forum.inductiveautomation.com/t/feature-1478-get-profiles-list-get-all-user-sources/11401/2 "2020-12-11T15:44:03Z")

</div>

Any updates here? I do have the same requirement.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [January 4, 2021, 1:31am UTC](https://forum.inductiveautomation.com/t/feature-1478-get-profiles-list-get-all-user-sources/11401/3 "2021-01-04T01:31:29Z")

</div>

I’d also find it useful to get a list of user sources on a gateway via scripting to replace the magic strings in listUserSources below and make this function standard for all gateways. Is there something I’m missing?

```auto
def listUserSources():
	""" Return list of user sources on gateway."""
	return ["Hybrid", "default"]

def getFullName(username, userSource=None):
	""" Get user's full name from specified user source, or the first one with username when none specified."""
	if userSource:
		user = system.user.getUser(userSource, username)
	else:
		for userSource in listUserSources():
			user = system.user.getUser(userSource, username)
			if user:
				break
	return user.get("firstname") + " " + user.get("lastname")

```

---

<div class="post-metadata">

**Author:** ![jspecht](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jspecht/32/6465_2.png) [@jspecht](https://forum.inductiveautomation.com/u/jspecht)\
**Post date:** [January 4, 2021, 7:31pm UTC](https://forum.inductiveautomation.com/t/feature-1478-get-profiles-list-get-all-user-sources/11401/4 "2021-01-04T19:31:20Z")

</div>

There is currently no good way to fetch the list of all configured user source profiles from a script. From gateway scope, you could use this for now, but just know it depends on internal data structures which (though not likely to change in the foreseeable future) may change:

```auto
	from com.inductiveautomation.ignition.gateway import IgnitionGateway
	from simpleorm.dataset import SQuery
	from com.inductiveautomation.ignition.gateway.user import UserSourceProfileRecord
	query = SQuery(UserSourceProfileRecord.META).ascending(UserSourceProfileRecord.Name)
	results = IgnitionGateway.get().getPersistenceInterface().query(query)
	userSourceProfileNames = []
	for result in results:
		userSourceProfileNames.append(result.getName())
	return userSourceProfileNames

```

---

<div class="post-metadata">

**Author:** ![tony.petruzzi1](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@tony.petruzzi1](https://forum.inductiveautomation.com/u/tony.petruzzi1)\
**Post date:** [April 15, 2021, 6:29pm UTC](https://forum.inductiveautomation.com/t/feature-1478-get-profiles-list-get-all-user-sources/11401/5 "2021-04-15T18:29:55Z")

</div>

Has this been implemented?

---

<div class="post-metadata">

**Author:** ![jspecht](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jspecht/32/6465_2.png) [@jspecht](https://forum.inductiveautomation.com/u/jspecht)\
**Post date:** [January 31, 2022, 6:55pm UTC](https://forum.inductiveautomation.com/t/feature-1478-get-profiles-list-get-all-user-sources/11401/6 "2022-01-31T18:55:10Z")

</div>

The latest early access build of 8.1 (8.1.15-b20220131) has implemented a system.user.getUserSources() scripting function which takes no arguments and returns a sequence of objects representing all of the user source profiles configured in the Gateway. Each object has a “name” property, a “description” property, and a “type” property.
