Create a user using REST

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Security definition > Work Portal Security > Synchronizing users > Synchronizing users using SCIM's REST methods > Getting started with user sync using REST >

Create a user using REST

To create users using the Bizagi SCIM you must use the service described in this article. The following example uses POSTMAN as the client, but you are able to invoke this service from any client compatible with RESTful services with OAUth 2.0 authentication.

 

Before continue, review the Getting started with the synchronization procedure section.

 

Resource URL

[Project_URL]/scim/v2/Users

 

HTTP Method

POST

 

Authorization

OAuth 2.0

 

Input

The structure of the JSON message that must be sent in the body of the invocation is the following. In [VariableName] you find the name of variables that must be sent from your external system:

 

{

  "schemas":[

     "urn:ietf:params:scim:schemas:core:2.0:User"

  ],

  "userName":"[userName]@[domain]",

  "active":"[activeUser]",

  "name":{

     "familyName":"[FamilyName]",

     "middleName":"[MiddleName]",

     "givenName":"[GivenName]"

  },

  "emails":[

     {

        "value":"[email]",

        "type":"[emailType]",

        "primary":"[primaryEmail]"

     }

  ],

  "phoneNumbers":[

     {

        "value":"[phoneNumber]",

        "type":"[phoneType]",

        "primary":"[primaryPhone]"

     }

  ],
  "urn:ietf:params:scim:schemas:extension:bizagi:2.0:UserProperties":

     {
        "DelegateEnabled": [DelegateEnabled],
        "enabledForAssignation": [AssignationEnabled],
        "createdCasesSkipAssigRules": [SkipAssignations]
        "[NewUserProperty]": [PropertyValue]
    }

}

 

note_pin

To ensure the correct performance of the user creation feature, it is crucial to map the enabledForAssignation attribute.

 

note_pin

Synchronization of User Properties is not available in Entra ID.

 

Where

 

Variable XPath

Description

Type

Bizagi User Property (WFuser)

userName

The userName in Bizagi. This is a mandatory field. Username@domain cannot exceed 25 characters. You can also use this format domain\user.

String

userName  and domain

active

Boolean value that defines if the user is active in Bizagi an can access the Work Portal.

Boolean

Active

name.FamilyName

Last name of the user. This is concatenated with the GivenName and MiddleName, and sent as the name of the user in this format "givenName_MiddleName_FamilyName". This is a mandatory field if the others are empty.

String

name = GivenName_MiddleName_FamilyName

name.MiddleName

Middle name of the user. This is concatenated with the GivenName and FamilyName And sent as the name of the user in this format "givenName_MiddleName_FamilyName". This is a mandatory field if the others are empty.

String

name = GivenName_MiddleName_FamilyName

name.GivenName

First name of the user. This is concatenated with the MiddleName and FamilyName, and sent as the name of the user in this format "givenName_MiddleName_FamilyName". This is a mandatory field if the others are empty.

String

name = GivenName_MiddleName_FamilyName

emails.value

E-mail of the user in Bizagi.

String

Contact email

emails.Type

Only the work type is stored in Bizagi.  The type of email is not stored in the WFUser, but this parameter must have a value in the JSON.

String

N/A

emails.primary

Boolean value. Must  always be true if you want to store the email in Bizagi.

Boolean

N/A

phoneNumbers.value

The mobile phone number stored in Bizagi.

String

Contact Cellphone

phoneNumbers.Type

Only the work type is stored in Bizagi. The type of phone is not stored in the WFUser, but this parameter must have a value in the JSON.

String

N/A

phoneNumbers.primary

Boolean value. Must  always be true if you want to store the email in Bizagi.

Boolean

N/A

DelegateEnabled

Boolean value that defines if the user is going to have a delegated user.

Boolean

Delegate Enabled

enabledForAssignation

Boolean value that defines if the user can be selected by the administrator in assignations.

Boolean

Enabled for Assignation

createdCasesSkipAssigRules

Boolean value that defines if cases created by the user skip assignation.

Boolean

Skip assignments on cases created by me

NewUserProperty

This is an example of a new user property created in the expert view. This is not supported in Entra ID.

Same as the new user property

New user property

 

The final execution in POSTMAN looks like this:

 

SCIM_10

 

The response is a JSON with the SCIM schema and the information saved in Bizagi.

 

note_pin

You cannot create multiple users in the same invocation. A bulk method to create multiple users is not available.


Last Updated 9/11/2024 10:24:54 AM