Create Users With Advanced SQL

I need to bulk insert users from a staging OutSystems table to System.User table. When I am trying a simple single record insert with advanced SQL, it gives me CHECK OPTION error. However, when I turn on the "Show Tenant Identifier" property, it gives no errors. But I don't want to turn on "Show Tenant Identifier" as it would give developers access to users from all tenants. 

Please suggest ways to make this INSERT SQL work without "Show Tenant Identifier" property ON.

Hi Junaid ,

Could you please explain it a bit more , where are you doing this , are you using a timer or doing it on some event like button click in application ?


Regards,

-PJ-

Hello Junaid.

I also need more explanation.

You can expose an action that has a set Tenant Id, so they can only create/see from their specific Tenant.

Hi Junaid,

What do you mean by "...from a staging OutSystems table to System.User table"? Also, how does the insert query is supplying the tenantId?

Hi Junaid,

  Probably not a help for your situation but there is a special entity called UserMT, this is the same as User but has show tenantsID on, this lets you uses both Users with tenant filter AND UserMT without tenant filter at the same time in an espace .

Hi Junaid,

Not a direct answer to your problem, but a note on the insert of users.

Please be aware you cannot just write a plain text password with Advanced SQL in the password attribute of the user record. Check out the solution of this post on how to do that.

Regards,

Daniel