Register a user to a specific group and user type through idx.register()

How do I register a user to a specific group and user type through idx.register() ?

Step 1
   let registerTransaction = await oktaAuth.idx.register({
      firstName: "testuser",
      lastName: "testlastname",
      email: "testemail@gmail.com"
      authenticators: ["okta_password"]
    });

and then proceed with

Step 2
 const proceedTransaction  = await oktaAuth.idx.proceed({
      password: "myPwd"

    });

for the above step 2 I get status as Pending and nextStep as select-authenticator-enroll for email and phonenumber and that could be because authenticator enrollment policy as email and phone number is optional. But since I need registration only with password I have step 3 because in availableSteps I have select-authenticator-enroll, skip and cancel

Step 3
   const skipTransaction  = await oktaAuth.idx.proceed(
      { skip: true }
    );

for the above step 3 I get status as Success with tokens consisting of access and id.
The user gets created with the password but the user is added to “Everyone” group and user type is “User”. Is it possible to provide group and user type in idx functions ?

I was able to create a user in Okta assigned to specific group by updating the profile enrollment. I had to create a custom profile enrollment assigned to my OIDC app and configure inside it configure self service registration as allowed and add user to my custom group. Hence, the user is registered and added to the custom group via the above steps through idx sdk.

I still need to figure out how to create a user in Okta and assign it to a custom user profile type. In our custom user profile type I have custom attributes. Newly created users via idx sdk need to have those custom profile attributes populated as per custom profile user type. Any suggestions ?

As of now, Profile enrollment within Okta Identity Engine doesnt have an option to add a user to a custom user profile type. One can add only through default User type in profile enrollment section.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.