How To Read a Custom User Profile Attribute With Okta Workflows

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 read a custom user profile attribute?

If you prefer a video, jump to the end of this blog post to watch a short video about this question and answer.

Okta user types

Okta has a built-in default user type and allows to create 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 user types

You will first learn how to read a custom attribute on the default user type.

Reading a custom attribute on the default user type

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

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
Custom user profile attribute

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

Profile with a custom attribute

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

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:

Showing a custom attribute

Running the flow shows the custom LinkedIn profile attribute:

Read User card history

Reading a custom attribute on a custom user type

Now, let’s learn how to read a custom attribute on a custom user type.

Click on the custom Atko User user type:

User types

This custom user has one custom attribute, Portfolio URL:

A custom user type with a custom attribute

User Irene Johnson has a custom user type:

Custom user type

Irene also has the Portfolio URL custom attribute set:

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.

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:

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:

Reading user information flow – history

Video

Watch a short video about this question and answer.

What you learned

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


More resources to help you learn:

🍫 Get help from Workflows specialists during weekly community office hours.

πŸ“Ί Learn from short Workflows videos.

πŸ™‹πŸ»β€β™€οΈ Join the #okta-workflows channel on MacAdmins Slack to learn and get help from the community

Published by

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.