Administrators in the Strategy Workstation may find it challenging to manually track and list the privileges assigned to each active user. This manual process can be cumbersome and prone to errors, necessitating a solution to streamline the task.
The need for this script stems from the administrative challenge of manually listing the privileges of each active user in a given Strategy environment, which can be time-consuming and prone to errors.
To automate the listing of user privileges for all active users, adhere to the following steps in the Strategy WorkStation:
1. Connect to Your Environment: Initialize the connection to your Strategy environment.
2. Navigate to Administration: Access the administration panel to manage scripts and workflows.
3. Access Scripts Section: Go to the scripts section where you can create or modify scripts.
4. Select Your Environment: Choose the appropriate environment where the script will be executed.
5. Open Gallery Tab: In the right section of the interface, select the Gallery tab to view available workflows and scripts.
6. Expand Administration Workflows: Find and expand the Administration Workflows section to access various administrative scripts.
7. Launch 'List Active User Privileges' Script: Double-click on the 'list active user privileges' script to open it.
8. Execute the Script: Press the run button to execute the script, which will automatically list the privileges of all active users.

Here is the Python script in Workstation that facilitates this operation:
"""List user privileges for all active users."""
from typing import List
from mstrio.connection import Connection, get_connection
from mstrio.users_and_groups import list_users
def list_active_user_privileges(connection: "Connection") -> List[dict]:
"""List user privileges for all active users.
Args:
connection: Strategy connection object returned by
`connection.Connection()`
Returns:
list of dicts where each of them is in given form:
{
'id' - id of user
'name' - name of user
'username' - username of user
'privileges' - list of privileges of user
}
"""
all_users = list_users(connection=connection)
active_users = [u for u in all_users if u.enabled]
privileges_list = []
for usr in active_users:
p = {
'id': usr.id, 'name': usr.name, 'username': usr.username, 'privileges': usr.privileges
}
print(f"{p['name']} ({p['username']}) ", flush=True)
for prvlg in p['privileges']:
print("\t" + prvlg['privilege']['name'], flush=True)
privileges_list.append(p)
return privileges_list
# connect to environment without providing user credentials
# variable `workstationData` is stored within Workstation
conn = get_connection(workstationData, 'Strategy Tutorial')
# list privileges for all enabled users
list_active_user_privileges(conn)
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.