Create User
  • 05 May 2023
  • 2 Minutes to read
  • Dark
    Light

Create User

  • Dark
    Light

Article summary

Step Details
Introduced in Version4.2.0
Last Modified in Version7.1.2
LocationIntegration > Okta

The Create User step creates a new Okta user account.

Prerequisites 

This step requires the Okta module to be installed before it will be available in the toolbox. 


Properties

Inputs

PropertyDescriptionData Type
Activate ImmediatelyDetermines if the account activates immediately or not.Boolean
Group Names For UserOkta groups the created account will belong toString
User DataThe account credentials created in Okta. Set input to Constant.OktaUser

Outputs

PropertyDescriptionData Type
OutputNewly created Okta userOktaUser

Common Errors

Exception invoking method CreateUser on class

This error occurs if the Okta module is not properly set up. In Decisions go to Settings > Okta > Edit Okta Settings. Review the Okta Subdomain or URL and confirm that it is correct. 

In Okta review the SAML settings under Applications > Decisions > General.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Create User 1[CreateUser] in flow [Okta Test]: Exception invoking method CreateUser on class OktaUserManagementMethods
 ---> DecisionsFramework.LoggedException: Exception invoking method CreateUser on class OktaUserManagementMethods
 ---> System.InvalidOperationException: An error occurred deserializing the error body for response code 404. See the inner exception for details.
 ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue(
 at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter
 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent
 at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType
 at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader
 at Okta.Sdk.Internal.DefaultSerializer.Deserialize[T](String input
 at Okta.Sdk.Internal.DefaultSerializer.Deserialize(String json
 at Okta.Sdk.Internal.DefaultDataStore.EnsureResponseSuccess(HttpResponse`1 response)
   --- End of inner exception stack trace --- at Okta.Sdk.Internal.DefaultDataStore.EnsureResponseSuccess(HttpResponse`1 response
 at Okta.Sdk.Internal.DefaultDataStore.PostAsync[TResponse](HttpRequest request, RequestContext requestContext, CancellationToken cancellationToken
 at Okta.Sdk.OktaClient.PostAsync[TResponse](HttpRequest request, CancellationToken cancellationToken
 at Okta.Sdk.UsersClient.CreateUserAsync(ICreateUserRequest body, Nullable`1 activate, Nullable`1 provider, UserNextLogin nextLogin, CancellationToken cancellationToken
 at Decisions.Okta.OktaUserManagementMethods.CreateUser(OktaUser userData, String[] groupNamesForUser, Nullable`1 activateImmediately
 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor
 at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
   --- End of inner exception stack trace ---

Exception invoking method CreateUser on class

This error also occurs if security question and password requirements are not met.

Name: Error running step Create User 1[CreateUser] in flow [Okta Test]: Exception invoking method CreateUser on class OktaUserManagementMethods                 Exception Message: Error running step Create User 1[CreateUser] in flow [Okta Test]: Exception invoking method CreateUser on class OktaUserManagementMethods                                  Input Values: -- No Data --                                  Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Create User 1[CreateUser] in flow [Okta Test]: Exception invoking method CreateUser on class OktaUserManagementMethods 
 ---> DecisionsFramework.LoggedException: Exception invoking method CreateUser on class OktaUserManagementMethods 
 ---> System.Exception: Api validation failed: password (E0000001):    Cause of error:  password: Password requirements were not met. Password requirements: at least 8 characters, a lowercase letter, an uppercase letter, a number, no parts of your username. Your password cannot be any of your last 4 passwords.     
   at Decisions.Okta.OktaUserManagementMethods.CreateUser(OktaUser userData, String[] groupNamesForUser, Nullable`1 activateImmediately) 
   at InvokeStub_OktaUserManagementMethods.CreateUser(Object, Object, IntPtr*) 
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)   
   --- End of inner exception stack trace --- 
   at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data) 
   at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData) 
   at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)   
   --- End of inner exception stack trace ---

Related Information

Installing and Configuring Okta Module


Was this article helpful?