How to Get the Number of Users or Applications Assigned to a Specific Group with Okta Workflows
Last Updated:
Overview
An Okta Workflow can obtain the number of users in a certain group or all groups for building a custom report.
Construct a flow using the Search Groups, Construct, Custom API Action, and Get Multiple cards to retrieve the group ID and extract the user and application counts.
Administrators can also use the Get Okta group membership and application counts for a single group template in the Okta Workflows console to retrieve statistics for an Okta group.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Workflows
Solution
How to retrieve the number of users or applications assigned to a specific group in Okta Workflows?
Retrieve the user or application count for a single group by configuring an Okta Workflows flow to search for the group, construct the query parameters, and execute a custom API call.
- Use the group name in the flow to obtain the user count for a single group.
- Add the group name to the Search Groups card to obtain the ID.
- Use a Construct object card to build the expand stats object.
- Run an API custom call with a GET call using the group ID and the expanded stats query parameter.
- Use the Get Multiple card to retrieve the user count and application count.
Review the following example flow configuration that demonstrates how to connect the cards to retrieve the group statistics. Also, Okta Workflows template list includes “Get Okta group membership and application counts for a single group,” covering user members, nested groups, and assigned apps available via the Okta Workflows Console > Templates.
Related References
- Use the Okta API to Return the Number of Users in a Group
- Okta Workflows template list includes “Get Okta group membership and application counts for a single group,” covering user members, and assigned apps.
