cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

How can we manage login user which is stored in DB on thingworx mashup?

dhiraj2
4-Participant

How can we manage login user which is stored in DB on thingworx mashup?

I have manage one created user(super admin) which having administrator access but i'm unable to manage user which is created by super admin (i.e studio admin) which is stored in database,So how i can manage these studio admin users for log in on mashup? Is there any way to login every user by using organisation URL?

Here is my log In user hierarchy :

Super admin(created in Thingworx user)->Studio admin(created by super admin which is stored in DB) ->Trainer(created by studio admin which is stored in DB)

 

Like super admin organisational url i can login successfully.

How i can manage all login user in one organisation URL? 

 

Thanks in advance

17 REPLIES 17
PaiChung
22-Sapphire I
(To:dhiraj2)

to log into Thingworx there has to exist a Thingworx user.

You can have multiple organizations each with their own login page <server>/Thingworx/FormLogin/OrganizationName

 

dhiraj2
4-Participant
(To:PaiChung)

Yes, I have one user name as "super admin" which is exist in thingworx but requirement is super admin will create many admins from mashup form which will be stored in DB and then those admin will login from mashup.Also

super admin will be login from this URL <server>/Thingworx/FormLogin/OrganizationName its correct i did that but

my question is, how we can login all created admins by super admin which stored in DB?

is there any way to login all admins from above URL?

 

 

PaiChung
22-Sapphire I
(To:dhiraj2)

All the users created have to be existing users in Thingworx itself, so you might have to create them twice.

And then they need to be in the same Org to use that one URL to login.

dhiraj2
4-Participant
(To:PaiChung)

But consider i have created 1000 user it very difficult to manage in thingworx or existed in thingworx..

Is there any way to create one user in thingworx and by using that user we can created many user using mashup  which is stored in postgresql DB not in thingworx user list,. So how we can login using user which is stored in Database on thingowrx organization URL.

PaiChung
22-Sapphire I
(To:dhiraj2)

Perhaps you can consider using something like LDAP and Thingworx to LDAP integration

or SSO?

Else you may have to use some services and mashups to make the management a little simpler

SSO is an option to overcome the issue to create a user in TWX "manually". Anyhow all users from SSO gets automatically created in the TWX user list. There is no workaround to save user licenses. Also keep in mind that the security is based on the organisation of the user and the groups. Just having a username in a datatable will not solve your requirements that the user get access. There are easy java scripts possible that do mass creation of 1000 users. Absolutely no problem. Easiest if you have a user already you can use as a copy template for the new user.

dhiraj2
4-Participant
(To:StefanBode)

Thanks for your rpl.

But on the nadie of twx user all information is depend.So how can i give
the detail to database that this is right user for this information.
Example.
I have create twx user using mashup also i assign this user to speciffic
gym.Then under that user other information will created on time which is
stored in DB..
So when this user log in using organisation URL how can we show all
information related to this twx user because we never give any relation to
database info and the twx user,,how can we give twx user id to database so
that we can show all information under that that user..
Please suggest something..


StefanBode
12-Amethyst
(To:dhiraj2)

Hi, any DB can be connected using one of the JDBS connectors. Between your users in ThingWorx and the User in the external database should be a common key. e.g. the username. With this in mind it is easy to create a small service that executes a select on the username and brings back the columns as a infotable with a datashape as result. This service can easily bound in mashups and you can use the result with the additional information to show you external values. 

 

Is this what you were asking for?

dhiraj2
4-Participant
(To:StefanBode)

No,Actually I have built the service which create the twx user by using
mashup.
Now I want to give this user's user id(generate on time while creating
user) to database table to get the data related to this user id.

Example:
If I have created one twx user and then I login using this created
user...Now I have added some data under that user using other mashup
functionality which is in my project...So I want to keep the data in
database according to user id, so that I can get this data user wise.

I have created the twx user but unable to manage data according to user in
DB.

In a simple way,how can I assign created twx user's user_id to database
table..
How can I do that?
PaiChung
22-Sapphire I
(To:dhiraj2)

Since Thingworx user names are unique. If they are logging in, you can just use GetCurrentUser() and associate your database data that way.

Seems like a lot of extra work though, have you looked into approaches like

Thingworx Permissions, Visibility

Using multiple persistence providers

Not sure what exactly your use case is.

dhiraj2
4-Participant
(To:PaiChung)

Thanks for your rpl.

Is there any priviledge to add user_id while creating twx user so that i
can give it to DB table.

I want to create multiple user from mashup and these each user are in the
studio-admin group which having a home mashup.So i want when i login using
any user, i want that data on mashup which is related to login user And
that user data are stored in DB already. So i want to get data accordingly
when i login using any user.

StefanBode
12-Amethyst
(To:dhiraj2)

No you can't add the external USER_ID as a NON-changeable field in the user data. You have to do it the other way around and put the ThingWorx USERNAME into your DB. This USERNAME is unique in ThingWorx. You can use one of the existing user attributes but from security point this a strict NO-GO

MAybe you want to add to the ThingShape "UserExtension" (hidden system) a new field Called USER_ID. But then you must make this persistent and I think READONLY is also required to avoid that a user can modify the content

dhiraj2
4-Participant
(To:StefanBode)

So can I add user_id value in user extension USER ID field while creating
twx user on run time. So that I can give it to the database .
StefanBode
12-Amethyst
(To:dhiraj2)

Yes, but be careful. The User has write permission on the extension fields and therefore is also able to change the field USER_ID. To prevent this you have to set DENY rights for the user to change it and only allow the administrative action during user creation to fill in this field. 

slangley
23-Emerald II
(To:dhiraj2)

Hi @dhiraj2.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Thank you for your participation in our community!

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @dhiraj2.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Thank you for your participation in our community!

 

Regards.

 

--Sharon

Announcements


Top Tags