webMethods.io Integration: create an account for a connection to Cumulocity IoT

Overview

In other articles (Create a Cumulocity IoT trigger, Create a Cumulocity IoT Connector) we described how to create webMethods.io components interacting with Cumulocity IoT.
Triggers and connnectors rely on a connection to the target Cumulocity IoT tenant which is managed as an Account in webMethods.io

The purpose of this document is to explain in detail how to create a Cumulocity IoT Account in webMethods.io to access Cumulocity IoT resources.

Prerequisites

Cumulocity IoT credentials with admin permissions on “Application management” are required to be able to create a Cumulocity IoT Account in webMethods.io.

If you are unsure your credentials have the necessary permissions, please check this in this Cumulocity IoT
Administration.
As in Cumulocity IoT permissions are not granted directly to users, but applied to roles which are in turn assigned to users, this has to be checked in two steps:

Creation of a new Cumulocity IoT Account

Once it has been checked that the Cumulocity IoT credentials have the required permission, the Cumulocity IoT Account can be configured in webMethods.io.

For Cumulocity IoT Accounts, only the properties below are taken into account. All other properties are ignored and their default value can be left unchanged.

  • Account Name: This is the name that will be displayed in the list of Cumulocity IoT connections in both trigger and connector settings.
  • Server URL: This is the URL of the target Cumulocity IoT instance.
    :information_source: Only the root path is to be provided (like https://mytenant.cumulocity.com for instance) with no “/” at the end.
  • Username / Password: Credentials of the Cumulocity account to be used.
    Note that these credentials require admin permissions for “Application management”.
  • Cumulocity Application Name: This is the name of an internal Cumulocity IoT microservice application that will be created / reused for data access. Unless there is any specific usage requirement, the default name “wmio-connector-app” can be used.

:information_source: The Cumulocity IoT Accounts in webMethods.io Integration are shared between Cumulocity IoT triggers and connectors and can be created from / applied to both types of components.

After the successful creation of the Cumulocitiy IoT Account, the new Account is available for selection in the trigger or connector settings.

Summary / Next Steps

With this article you have all the required knowledge to create a Cumulocity IoT Account in webMethods.io.
As a next step you can read:

Further technical information - Internal use of Account credentials and Cumulocity Application Name

The Cumulocity IoT triggers and connectors in webMethods.io Integration do not access Cumulocity IoT directly with the provided account credentials.
Instead of this, upon creation of a new Cumulocity IoT Account, several actions are carried out in the background by webMethods.io:

  1. The provided credentials are used to create / reuse the microservice application in Cumulocity IoT with the provided Application Name - hence the required admin permissions for “Application management”.
  2. The microservice application is granted all rights needed for the triggers and connectors, in particular for the subscription to Cumulocity IoT notifications.
  3. A “Service User” for the microservice application is kept internally in webMethods.io and is not visible to anyone.
    This Service User is used by webMethods.io to access Cumulocity IoT during the execution of the workflows.
    This means that the user credentials used to create the account can later be modified or deleted without any impact on the execution of the workflows.
2 Likes

Hi There,
I followed this article to establish a connection to my Cumulocity instance from WM.IO Workflow. After clicking the Add button, I get an “Invalid Credentials or Bad Credentials” Error. The error description is given down below.

PS: I am able to login to the softwareag cloud using the same credentials and navigate to the Cumulocity instance from the App Switcher…
However, when I am try to access the cumulocity instance directly using its own url(given below), I get the invalid user/password error as shown in the attached image. But, when I am use the Login with SoftwareAG Cloud option, I am able to login with the same credentials.

Appreciate any help to solve this issue. Thanks

Cumulocity Instance Name - https://env568912.us.cumulocity.com
Error Message:
Failed to create account : Error occurred while enabling the connection: Error occurred while preparing a request for the connection alias: 'fld_1049194622_stage00.projects.flc04a5ecee503e07fb02636.WmCumulocityCoreLibraryProvider.com_softwareag_cloudstreams_WmCumulocityCoreLibraryConnector.connections:WmCumulocityCoreLibraryConnector_1'. Details: Could not execute the map service 'com.softwareag.cloudstreams.WmCumulocityCoreLibraryConnector.default_resourcegroup.services:fetchAuthHeader'. Exception: 401: Invalid credentials! : Bad credentials, error code: Could not execute the map service 'com.softwareag.cloudstreams.WmCumulocityCoreLibraryConnector.default_resourcegroup.services:fetchAuthHeader'. Exception: 401: Invalid credentials! : Bad credentials

`

What is the username you are trying to use?

musthafa.pasha@royalcyber.com

Disclaimer: This message and any files transmitted with it are confidential and privileged. If you have received it in error, please notify the sender by return e-mail and delete this message from your system. If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this e-mail is strictly prohibited.

Have you a link to the article you mention?

Hi Robert,
Yes, it is in the same thread. I left my comment to it. Anyways, here you go -

All the tutorials specify you should use a local cumulocity account. I don’t think the account you are trying to use is a local one.
Try adding a new account in the tenant specifically for your integration.

1 Like

I don’t see that instruction in this KB article, but that really worked. Thanks for your help!

This from the webmethods.io documentation.

1 Like