Skip to main content
10-Marble
November 29, 2019
Solved

Create Application Key in a service

  • November 29, 2019
  • 4 replies
  • 2008 views

Hello,

 

I'm on Thingworx 8.4

I'm trying to create application key with a service, but unfortunately some user can't do that. 

 

Previously, I had this error : Unable to process import: Not authorized for Create
So I went to Permission -> Collection -> Application Key -> Design Time and add user and give it the rigth to create and delete.

 

But now, I have this error : Import Failed: Unable to create applicationKey: [1,018] Data store unknown error: [Error occurred while accessing the model provider.]]

 

Some users (Administrator, or users in Admin group) could do this action without problem

 

Do you have some information about this please ?

Best answer by Dorian

The problem is solved, in fact, after changing DesignTime permission, I have to restart Thingworx 

 

After restarting, my user could create application key thanks to Resources["EntityServices"].CreateApplicationKey(params);

 

Thank you

4 replies

19-Tanzanite
November 29, 2019

Hi @Dorian 

 

Could you give more details about your service ?

What do you use to create the appkey ?

 

Thanks

Christophe

 

Dorian10-MarbleAuthorAnswer
10-Marble
December 2, 2019

The problem is solved, in fact, after changing DesignTime permission, I have to restart Thingworx 

 

After restarting, my user could create application key thanks to Resources["EntityServices"].CreateApplicationKey(params);

 

Thank you

19-Tanzanite
December 2, 2019

Strange. I'm pretty sure I was able to assign permissions for exactly this operation without needing to restart the platform. Happy that you managed to solve your issue though!

19-Tanzanite
November 29, 2019

Whenever that error happens it feels for me that the user you're using does not have visibility to the ThingWorxPersistenceProvider (system entity under the PersistenceProvider tab). Try to assign the visibility to the pers prov. and try again.