I can just write this code and it will work fine!
if { [string equal "organization" $object_type] } {
set org_id [db_nextval acs_object_id_seq]
set last_name "$cnpj"
#Create user with user_id equals to org_id
db_transaction {
array set creation_info [auth::create_user \
-user_id $org_id \
-first_names $name \
-last_name $cnpj \
-email $email \
]
}
}
That solves the issue for now 😊
Thanks Dave and Jim.