Okta Workflows How-To: Read a custom user profile attribute

About the Author

Max Katz

Staff Developer Advocate, Okta Workflows

Max Katz is a Staff Developer Advocate for Okta Workflows. Max loves the no-code automation space and creating educational content. Before Okta, Max led the North America Developer Advocacy team at IBM. Before IBM, Max led developer advocacy for a cloud-based mobile app platform, Appery, helping it grow from zero to over 400,000 developers. Max regularly writes on his http://maxkatz.net blog. 

28 February 2023 Time to read: ~

A man is seated at a desk using a laptop in a contemporary office setting

Okta Workflows is a no-code platform for automating identity processes. 

This blog post is based on a question asked during office hours or the #okta-workflows channel in MacAdmins Slack: How to read a custom user profile attribute? 

Prefer a video? Skip to the walkthrough to see how to read custom user profile attributes.

Getting started

Okta has a built-in default user type and allows the creation of custom user types. 

From the Admin dashboard, go to Directory > Profile Editor. You will see one or more user types listed (you might have more than two listed). In the screenshot below, two user types are shown:

  • User (default) – this is the default user type
  • Atko User – this is a custom user type
Okta admin console User Types interface listing two user profiles—"User (default)" and "Atko User"—indicated by orange arrows, alongside a "Create Okta User Type" button. Okta user types

Reading a custom attribute on the default user type

Clicking on User (default) opens up a profile editor shown below. 

Okta User Profile Attributes configuration interface displaying standard user profile fields. Profile attributes

On the left side, you see All attributes, Base attributes, or only Custom attributes. In this example, you have added one custom attribute to the default user type: 

  • LinkedIn profile
Okta Attributes configuration panel displaying a custom string attribute for "LinkedIn profile". Custom user profile attribute

User Stella Green has the default user type and has the LinkedIn profile custom attribute set: 

Okta profile attribute section showing Manager set to Sam Holiday and LinkedIn profile set to http://linkedin.com/in/stella001. Profile with a custom attribute

The custom attribute is on the default user type. You use the Okta Read User card to read the user information, including the custom attribute.

Okta Workflow diagram showing an Assign card setting a User ID and passing it into a Read User action card with profile properties like First Name, Last Name, and LinkedIn Profile. Reading user information with the Read User card

As the custom attribute is on the default user type, you can choose to show the field from ⚙️ > Choose fields:

Okta Read User action dialog showing selected profile fields, including a checked checkbox for LinkedIn profile. Choosing card fields

Running the flow shows the custom LinkedIn profile attribute:

Okta Workflows execution test showing an Assign card passing a User ID into a Read User card, outputting profile fields for user Stella Green. Read User card history

Reading a custom attribute on a custom user type

Click on the custom Atko User user type:

Okta admin console User Types interface listing two user profiles—"User (default)" and "Atko User"—indicated by orange arrows, alongside a "Create Okta User Type" button. Okta user types

This custom user has one custom attribute, Portfolio URL:

Okta profile attribute configuration page showing a custom attribute for "Portfolio URL" under the Atko User profile settings. A custom user type with a custom attribute

User Irene Johnson has a custom user type: 

Okta user account status card for Irene Johnson showing suspended status with Activate and More Actions buttons, with an orange arrow pointing to Change User Type. Custom user type

Irene also has the Portfolio URL custom attribute set: 

Okta user profile attribute snippet showing Manager and Portfolio URL fields with an example value. Custom attribute on a custom user type

If you use the Okta – Read User card, the card doesn’t know about the custom user type and doesn’t know about the custom attribute. The Read User card only knows about the built-in default user type. 

Okta Read User action dialog showing selected profile fields, including a checked checkbox for LinkedIn profile. Choosing card fields

The solution is to use a Custom API Action card to read a custom attribute on a custom user type. 

Reading a custom attribute on a custom user type with a Custom API Action card

Use Okta’s Custom API Action card to read user information, whether it’s the default user type or a custom user type. 

Make an API call to this endpoint: 

/api/v1/users/{userid}

This is a flow to read user information: 

An Okta Workflow diagram showing four connected steps for a custom API user retrieval, starting with an Assign card to define a custom user ID. Reading user information with Custom API Action card

In the above flow:

  • The Assign card sets the user ID
  • The Concatenate card appends the user ID to the end point (/api/v1/users/{userid})
  • The Custom API Action makes an API call
  • The Get Multiple card retries the Portfolio URL attribute

Learn how to use the Custom API Action card:

How to Call an API When It’s Not Available From an Existing Card (Connection)

Flow history: 

Okta Workflows execution history panel showing sequential cards for Assign, Concatenate, Custom API Action, and Get Multiple to fetch and parse user profile data. Reading user information flow – history

Watch the Walkthrough

See how to read custom user profile attributes step-by-step in this video demonstration.

Vidyard video

What you learned

In this blog post, you learned how to read a custom attribute on the default user type and a custom user type. 

Get your Workflows questions answered

Do you have a question about Okta Workflows? Not sure how to build a flow? Join the weekly community office hours to get help. 

About the Author

Max Katz

Staff Developer Advocate, Okta Workflows

Max Katz is a Staff Developer Advocate for Okta Workflows. Max loves the no-code automation space and creating educational content. Before Okta, Max led the North America Developer Advocacy team at IBM. Before IBM, Max led developer advocacy for a cloud-based mobile app platform, Appery, helping it grow from zero to over 400,000 developers. Max regularly writes on his http://maxkatz.net blog. 

Continue your Identity journey