Asset Import: Okta

This Wizard will create all the things you need to import Jira Users on a scheduled basis. First, it makes something called an "Object Type," which is usually called "Jira Users," but you can give it a different name if you want while following the steps. Then, it sets up an "Import Configuration" and gives it a special code (token) so you can bring in the Jira Users. After that, it creates an automatically job to get the Jira users from the Jira REST API and send them to the import engine regularly, like a scheduled task. You can decide how often this should happen.

Here's the important part: You only need to run it once to set everything up and finish the import. Just relax and wait until the first scheduled task is done. After that, you can see the results in the Asset module.

Steps

  1. Open the Wizard by clicking the three dots and select the Wizard.

  2. Click the Wizard Category: “Jira Service Management - Asset Import(s)”

  3. Click the “Asset Import: Okta”

  4. Select the PAT token that will read the Jira users from the REST API or create a new PAT token.

  5. Select the Asset Schema and the Object type name. You can also customize the import config name.


Select the Okta config that you want to import

 

  1. Select how often you want to run the job, tip you can multiselect in each dropdown.

  2. Click Create

Just wait until the schedule has triggered the job and view the result in the Asset module

 

Special notes

Update Import Mapping is versioned using the _version scripted variable. If you have multiple imports to okta make sure to have separate versions.

note that calling this twice results in 400, that is expected

Okta calls are paginated, these are found under Advanced → Pagination

Special Dynamic Flow Variable is used to collect the users and groups from Okta Apps.

Since the Get Okta app call returns an array of users, the Get users/groups in Apps will use an Iteration with $ to iterate over the response. It will also use this dynamic flow variable:

Name

Value

Behaviour

Name Property

Name

Value

Behaviour

Name Property

$.response.data

$.id

Append foreach

id

This is because the response from the Get apps will be a link to the user info which returns some user info, we will collect the user into in a variable called _flow like this

_flow: { "userid":["appid1","appid2"] }

 

Submitting user and groups uses special mustache function. https://rixter.atlassian.net/wiki/spaces/RIFJ/pages/1350696961

This will return an JSON array where it takes the response from the user/group and merge that with the _flow variable based on the property id and then it will be called apps in the final result.

{ "data":{ "users":{{{flowVarMerge payload _flow 'id' 'apps'}}} } }