Skip to main content
omkaro0002
Known Participant
June 24, 2022
Question

Get list of users.

  • June 24, 2022
  • 13 replies
  • 0 views

How can I get the list of active and inactive users without using any plugin?

13 replies

mikes0011
Brainy
June 24, 2022

I'm not sure this is generally possible without the use of a plug-in.  Can you share what use case you have that requires you to not use any plug-ins?

The Expression Guru
stefanhelzle0001
Brainy
June 24, 2022

A list of all users is simple. Create a group and add all users via a membership rule. Then query that group using a!groupMembers().

No OOTB solution for the inactive users.

davel001150
June 24, 2022

There's actually an already existing group called "All Users" that does exactly what Stefan said.  It uses a rule to gather every user in the system to itself.

I don't know if this still holds true, but in the past users were flagged inactive by being placed in an "Inactive Users" group that you could find, though I can't seem to find it now.

Handy little snippet for finding all of your group IDs:

a!forEach(
items: enumerate(300),
expression: try(
concat(fv!item, " - ", group(fv!item, "groupName")),
"That's not a group"
)
)

You shouldn't try using try() for anything that ever might make it to production, but for your own investigation in /rule that you're going to throw away in minutes, I say knock yourself out.

stefanhelzle0001
Brainy
June 25, 2022

I think you should be careful when suggesting brute-force "solutions" that also include calls to internal API and unsupported functions.