Add a New User to an Existing Organization

You can add an end-user to an existing organization without creating a new organization for them. This can be done by providing the OrgID of the organization that the user must be added to.

When the user has signed up, unique identification values such as ZUID and User ID are created for them by Catalyst.

Note :
  • You must provide the values for org_id, email_id, last_name mandatorily to add a user to an existing organization.
  • You can obtain the ZAID from the Environment settings in your Catalyst console.
  • You can also add them to a role by providing the role_id, which you can obtain from the Roles section in Authentication in the Catalyst console.
  • When inviting a new user, you can configure the sender’s email address, subject and the email message. You must add the email address in the Catalyst Mail Component and get it verified before using it in the SDK code.

Create a Dictionary

Before you add a new end-user to your Catalyst application, you must create a dictionary that contains the registration details of the particular user, as shown below. You can then pass the configured dictionary to the method that handles the user signup process.

    
copy
#Create a dictionary signup_config = { "platform_type": "web", "zaid": "1008807534", "template_details": { "senders_mail": "dogogetu@tutuapp.bid", "subject": "Welcome to %APP_NAME%", "message": "<p>Hello ,</p> <p>Follow this link to join in %APP_NAME% .</p> <p><a href='%LINK%'>%LINK%</a></p> <p>If you didn’t ask to join the application, you can ignore this email.</p> <p>Thanks,</p> <p>Your %APP_NAME% team</p>", }, } user_details = { "first_name": "Amelia", "last_name": "Burrows", "email_id": "amelia.burrows@gmail.com", "org_id": "1005641456", }

Add a New User to Existing Org

You can add a new end-user to an existing organization using the code below. You must pass the dictionary you created in the previous section as an argument to the add_user_to_org() method. This method handles the user sign-up process and returns a response.

Note : You will only be able to add 25 users in your application in the development environment. After you deploy your application to production, you can include any number of end-users in it.

To know more about the component instance authentication_service used below, please refer to this section.

Parameters Used

Parameter Name Data Type Definition
signup_config Object A Mandatory parameter. Will store the user registration details, including the application platform, ZAID, and the email information to be sent after registration.
user_details Object A Mandatory parameter. Will hold the user registration details such as first name, last name, email ID and ID of the organization to which the user has to be registered.
    
copy
#Add new user to an existing organization authentication_service = app.authentication() response_data = authentication_service.add_user_to_org(signup_config, user_details)

A sample response is shown below :

    
copy
{ "zaid":"1008807534", "user_details":{ "zuid":"1005643749", "org_id":"1005641456", "status":"ACTIVE", "is_confirmed":false, "email_id":"amelia.burrows@gmail.com", "first_name":"Amelia", "last_name":"Burrows", "created_time":"Aug 12, 2021 03:56 PM", "modified_time":"Aug 12, 2021 03:56 PM", "invited_time":"Aug 12, 2021 03:56 PM", "role_details":{ "role_name":"App User", "role_id":"2305000000006024" }, "user_type":"App User", "user_id":"2305000000009002", "project_profiles":[ ] }, "redirect_url":"https://aliencity-66446133.development.catalystserverless.com/app/", "platform_type":"web", "org_id":"1005641456" }
Info : Refer to the SDK Scopes table to determine the required permission level for performing the above operation.

Last Updated 2025-03-28 18:24:49 +0530 +0530