// Fields for 'get', 'update', and 'delete' operations
{
displayName:'User',
name:'userId',
type:'resourceLocator',
default:{mode:'list',value:''},
required: true,
modes:[
{
displayName:'From List',
name:'list',
type:'list',
placeholder:'Select a user...',
typeOptions:{
searchListMethod:'getUsers',
searchable: true,
},
},
{
displayName:'By username',
name:'login',
type:'string',
placeholder:'',
},
{
displayName:'ID',
name:'id',
type:'string',
placeholder:'e.g. 00u1abcd2345EfGHIjk6',
},
],
displayOptions:{
show:{
resource:['user'],
operation:['get','update','delete'],
},
},
description:'The user you want to operate on. Choose from the list, or specify an ID.',
},
// Fields specific to 'create' operation
{
displayName:'First Name',
name:'firstName',
type:'string',
required: true,
placeholder:'e.g. Nathan',
displayOptions:{
show:{
resource:['user'],
operation:['create'],
},
},
default:'',
routing:{
send:{
property:'profile.firstName',
type:'body',
},
},
},
{
displayName:'Last Name',
name:'lastName',
type:'string',
required: true,
placeholder:'e.g. Smith',
displayOptions:{
show:{
resource:['user'],
operation:['create'],
},
},
default:'',
routing:{
send:{
property:'profile.lastName',
type:'body',
},
},
},
{
displayName:'Username',
name:'login',
type:'string',
required: true,
placeholder:'e.g. nathan@example.com',
hint:'Unique identifier for the user, must be an email',
displayOptions:{
show:{
resource:['user'],
operation:['create'],
},
},
default:'',
routing:{
send:{
property:'profile.login',
type:'body',
},
},
},
{
displayName:'Email',
name:'email',
type:'string',
required: true,
placeholder:'e.g. nathan@example.com',
displayOptions:{
show:{
resource:['user'],
operation:['create'],
},
},
default:'',
routing:{
send:{
property:'profile.email',
type:'body',
},
},
},
{
displayName:'Activate',
name:'activate',
type:'boolean',
displayOptions:{
show:{
resource:['user'],
operation:['create'],
},
},
default:true,
description:'Whether to activate the user and allow access to all assigned applications',
},
{
displayName:'Fields',
name:'getCreateFields',
type:'collection',
displayOptions:{
show:{
resource:['user'],
operation:['create'],
},
},
default:{},
placeholder:'Add field',
options: createFields,
},
// Fields for 'update' operations
{
displayName:'Fields',
name:'getUpdateFields',
type:'collection',
displayOptions:{
show:{
resource:['user'],
operation:['update'],
},
},
default:{},
placeholder:'Add field',
options: updateFields,
},
// Fields specific to 'getAll' operation
{
displayName:'Search Query',
name:'searchQuery',
type:'string',
placeholder:'e.g. profile.lastName sw "Smi"',
hint:'Filter users by using the allowed syntax. <a href="https://developer.okta.com/docs/reference/core-okta-api/#filter" target="_blank">More info</a>.',
displayOptions:{
show:{
resource:['user'],
operation:['getAll'],
},
},
default:'',
routing:{
request:{
qs:{
prefix:'={{$value}}',
},
},
},
},
{
displayName:'Limit',
name:'limit',
type:'number',
displayOptions:{
show:{
resource:['user'],
operation:['getAll'],
returnAll:[false],
},
},
typeOptions:{
minValue: 1,
maxValue: 200,
},
default:20,
routing:{
send:{
type:'query',
property:'limit',
},
output:{
maxResults:'={{$value}}',// Set maxResults to the value of current parameter
},
},
description:'Max number of results to return',
},
{
displayName:'Return All',
name:'returnAll',
type:'boolean',
displayOptions:{
show:{
resource:['user'],
operation:['getAll'],
},
},
default:false,
description:'Whether to return all results or only up to a given limit',
},
// Fields for 'get' and 'getAll' operations
{
displayName:'Simplify',
name:'simplify',
type:'boolean',
displayOptions:{
show:{
resource:['user'],
operation:['get','getAll'],
},
},
default:true,
description:'Whether to return a simplified version of the response instead of the raw data',
},
// Fields specific to 'delete' operation
{
displayName:'Send Email',
name:'sendEmail',
type:'boolean',
displayOptions:{
show:{
resource:['user'],
operation:['delete'],
},
},
default:false,
description:'Whether to send a deactivation email to the administrator',