How can I fetch the name of the User Source configured in my Ignition project properties using a script?

I’m using Ignition version 8.1.37, and I want to retrieve the name of the User Source that’s selected in Project Properties → General → User Source.

I do not want to list all user sources or users within them — just the name of the active user source currently assigned to the project.

Is there a scripting function or a reliable way (in Gateway or Perspective scope) to get this value at runtime?

I once had the requirement to add users to the default userSource and this is how I did it.
Not sure if we can just get the name of the userSource.

You will have to use the SDK ProjectManager API that you can get from a gateway context. (Doing this is utterly unsupported, fwiw.)

1 Like

For some more breadcrumbs; once you have a project you need to obtain an instance of the GlobalProps resource.

Consider Ignition Extensions to get easier access to the local project. Note that it's no more 'supported' whether you're using Ignition Extensions or directly accessing the SDK. Do not contact our support department if you're doing something in here and it fails.

For my actual recommendation: just encode this in a project library constant or something. Is the default database going to change all that often, really?