How to Write Output From the List Users Card to a CSV File

Okta Workflows how-to guides are questions and answers from weekly community office hours, MacAdmins Workflows Slack channel, and other places. Read all other how-to guides

On to the question. 

How to write output from the List Users card to a CSV file?

You run a search with Okta – List Users with Filter card (or using any other search/filter card) and would like to save the result into a CSV file. This how-to guide will show you how to do that.

The workflow has the following steps:

  1. Find users
  2. Save to a table
  3. Export the table to a CSV file

This is the main flow:

A flow to save users to a CSV file
  • Okta – List Users with Filter card finds the users to save to a CSV file
  • List – For Each card goes over each user and saves the user to a table using a helper flow (see below). The entire User record is passed to the helper flow
  • Tables – Export to CSV card saves data from a table into a CSV file. You specify the CSV file name and optionally can specify which columns to export. In this example,,, the columns Name and Email are exported.

The table has two (custom) columns: Name and Email:

Workflows table with two columns

This is the helper flow that saves each user found into a table:

Save user information into a table

The flow has these steps:

  • Helper Flow card receives the User record
  • Get Multiple card retrieves First Name, Last Name, and Email fields from a user
  • Concatenate card creates a Full name from First Name and Last Name fields
  • And the last, Table – Create Row card, saves each user information into a table

Learn: How to Setup a Workflows Helper Flow (With For-Each and Streaming Cards)

When the main flow is run, the table is populated with user data:

Table with user data

Looking at main flow history, the Tables – Export to CSV card returns a file that you can download:

Main flow history

Opening User_data.csv file in Numbers:

Opening the CSV file in Numbers

More resources to help you learn:

🗂 Join the weekly community office hours to get help

📺 Short how-to Workflows videos to help you become a better automation builder.

🍿 A collection of helpful Workflows tips.

Published by

8 responses to “How to Write Output From the List Users Card to a CSV File”

  1. Hi Mark, I am doing a project to enforce Yubikey to a group of users. Few things I need to do:
    1. Read the user and list them in a table with what MFA they are enrolled in?
    2. If Yubikey is there, list the serial number of the Yubikey.
    3. Reset the Yubikey
    4. Record the time user is removed
    Thanks in advance, Regards

    1. Hi Wali – where are you reading the users from?

      1. Thanks for your reply. Reading user from Okta people directory. Want to get the list of people with their active MFA.

      2. Mohammad Wali Ullah Avatar
        Mohammad Wali Ullah

        I will read the user from the Okta people directory.

        1. Let me check what options are there to get a user’s MFA factors. I believe you can do it only via an API.

      3. Which step in the flow do you need help with?

        1. Mohammad Wali Ullah Avatar
          Mohammad Wali Ullah

          create a flow card to read users’ MFA factors from Okta and list users in csv file if it is Yubikey. The table needs to include, Yubikey’s serial number, date of enrolment, status, and last accessed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.