Bad credentials error while deploying microservice on Cumulocity IOT

Hi everybody,

I’ve just created a microservice package and I try to deploy it with:

but this error appear:

[ERROR] Error while communicating with platform. Error message: Invalid credentials! : Bad credentials

I use a free try account.

Please anyone can help

@ahmad.naja

In general, microservices use the standard Cumulocity IoT authentication mechanisms. This is performed in two steps:

  1. The microservice can be created in any tenant that have feature-microservice-hosting enabled.
  2. The microservices access the Tenant API.

hope, you have " feature-microservice-hosting" enabled. You can check in Administration application under subscribed application tab.
It is not enabled by default in free account. As your can see in your error messages , it throws http 401 code.

you read more about authentication and Authorization in Micro services in docs
https://cumulocity.com/guides/microservice-sdk/concept/#security

1 Like

thanks for your answer, but I don’t have feature-microservice-hosting in my applications!

Yeah, without this feature " feature-microservice-hosting" , you can not deploy Micro services into the Cumulocity tenant.

If you are interested to explore this feature, contact Software AG sales team. :slight_smile:
sales @cumulocity.com

1 Like