MindSphere app hosted locally (pump asset example)

0
Dear all   I am trying to follow the following path: https://docs.mendix.com/partners/siemens/mindsphere-example-app#:~:text=You%20can%20write%20Mendix%20apps,for%20a%20new%20Mendix%20app.   However, when I want to run the app locally, I get asked for application credentials. In the mindsphere developer cockpit I issued credentials for the app that I build in mendix. However when entering these credentials with a local run, results in the following message: Unable to fetch Application Credentials. Response Code: 401. ErrorType: com.mendix.modules.microflowengine.MicroflowException Message: 401: at MindSphereSingleSignOn.ACT_ApplicationCredentials (CallRest : 'Call REST (POST)') Advanced stacktrace:     Any clue about what is going wrong?   Thanks in advance.   Kevin  
asked
4 answers
0

I have created an app in the developer cockpit. I also added roles for the app and issues credentials. I received a client secret and client id. I assume that I can copy the tenant name which I find in my cockpit to the following constants in Mendix: 

 

*HostTenant (Name of Tenant where application is hosted.
Name is used during retrieval of application credentials.)

*UserTenant (Used in get application credentials.)

Could it be related to the fact that I am using a free tenant?

answered
0

Hi Kevin,

you also have to set the constant CockpitApplicationName. Make sure to take the same as the name from the application you are taking the application credentials from.

 

Hope this is helping.

answered
0

Thanks Stefan for the suggestion, but unfortunately this is not the cause of the problem. I already had the name filled in. In fact I have configured all the local constants.  When debugging the microflow I always end up with latesthttp response: Bad credentials.

answered
0

Hi Kevin,

the credentials also have a version number. Maybe this one is not fitting? 

The credential screen which is popping up when you start your app locally shows the given values from your constants. Are these the right ones?

If this is all not helping, maybe try to generate new credentials, but make sure that you increase the version number accordingly

 

answered