Skip to main content
1-Visitor
December 4, 2020
Solved

How to create User using service by using non administrator user Log in?

  • December 4, 2020
  • 1 reply
  • 11236 views

Hi 

I have created a non administrator user ("SuperAdmin") by using administrator in composer. Now I want to create a user by using SuperAdmin when SuperAdmin Logged In into Organization URL.

I have created a service which created a user and assign to a particular group.

I have given a Visiblity and RunTime permission to User group where the user is present.

I'm trying to create user using SuperAdmin Its gives me below error,please suggest right way

Execution error in service script [addAdminUser] :: Import Failed: Not authorized for Create

 Appreciated if any response from you.

Best answer by mnarang

The permission on Entity Service is fine but your non admin user will need one more permission and that is design time permission on user collection. You need to add your non admin user here as well

 

mnarang_0-1607513875227.png

 

1 reply

5-Regular Member
December 4, 2020

CreateUser is a service in EntityService resource, so first of all your non admin user should have run time permissions on entity service resource. Except this as this is user creation, your non admin user should also have design time permission on user collection in ThingWorx. If you have these two permission it will allow to create a new user. Let me know if you need screenshots of all the req permissions.

1-Visitor
December 7, 2020

Hi @mnarang 

I have one non admin user called "superadmin" and this user is under the super Admin group. So i have gave a visibility,RunTime and DesignTime permission to Entity Services, but still i'm getting below application log error.

Execution error in service script [addAdminUser] :: Import Failed: Not authorized for Create

I have attached the create thingworx user javascript program please check attachment.I dont know where i was wrong. Please suggest the right way.

mnarang5-Regular MemberAnswer
5-Regular Member
December 9, 2020

The permission on Entity Service is fine but your non admin user will need one more permission and that is design time permission on user collection. You need to add your non admin user here as well

 

mnarang_0-1607513875227.png