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

**URL:** <https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838>\
**Category:** Knowledge Base\
**Tags:** webMethods-c8y-connector, cumulocity\
**Created:** [February 14, 2023, 9:16am UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838 "2023-02-14T09:16:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic\_Joulin1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/frederic_joulin1/32/19452_2.png) [@Frederic\_Joulin1](https://community.cumulocity.com/u/Frederic_Joulin1)\
**Post date:** [February 14, 2023, 9:16am UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838/1 "2023-02-14T09:16:21Z")

</div>

## Overview

In other articles ([Create a Cumulocity IoT trigger](https://community.cumulocity.com/t/webmethods-io-integration-create-a-cumulocity-iot-trigger/7367), [Create a Cumulocity IoT Connector](https://community.cumulocity.com/t/building-system-integrations-with-the-new-cumulocity-iot-connector-for-webmethods-io/3517)) we described how to create [webMethods.io](http://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](http://webmethods.io/)

The purpose of this document is to explain in detail how to create a Cumulocity IoT Account in [webMethods.io](http://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](http://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:

- Check the roles assigned to the user, e.g. “admins” and “business” in this example  
 ![Cumulocity IoT user roles](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/6/e/6e992145d2554a3045b4fa57203af591e241ddc2.png)
- Find out if any of the assigned roles has “admin” permission on “Application management”. In this example the role “admins” does have the required permission  
 ![Cumulocity IoT role "admins"](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/8/d/8d4d1f862e25f4cafc42da1c622959f1f5a90c27.png)

## 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](http://webmethods.io/).

 ![New Cumulocity IoT account](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/6/0/6039306a707f6e23d17a51bf787653510ff43018.png)

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.  
ℹ 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.

> ℹ The Cumulocity IoT Accounts in [webMethods.io](http://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.

 ![Selection of Cumulocity IoT account in a trigger](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/9/0/903a8472115c100ad1193d3b1aa2af45659e6093.png)

## Summary / Next Steps

With this article you have all the required knowledge to create a Cumulocity IoT Account in [webMethods.io](http://webmethods.io/).  
As a next step you can read:

- [webMethods.io Integration: create a Cumulocity IoT trigger](https://community.cumulocity.com/t/webmethods-io-integration-create-a-cumulocity-iot-trigger/7367)
- [webMethods.io Integration: create a Cumulocity IoT connector](https://community.cumulocity.com/t/building-system-integrations-with-the-new-cumulocity-iot-connector-for-webmethods-io/3517)
- [Cumulocity integration with webMethods.io](https://community.cumulocity.com/t/cumulocity-integration-with-webmethods-io/2425)

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

The Cumulocity IoT triggers and connectors in [webMethods.io](http://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](http://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](http://webmethods.io/) and is not visible to anyone.  
This Service User is used by [webMethods.io](http://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.

---

<div class="post-metadata">

**Author:** ![Mir.Pasha](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Mir.Pasha](https://community.cumulocity.com/u/Mir.Pasha)\
**Post date:** [September 12, 2023, 8:29pm UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838/2 "2023-09-12T20:29:26Z")

</div>

Hi There,  
I followed this article to establish a connection to my Cumulocity instance from [WM.IO](http://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](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`

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/0/d/0d0e41a9c66b1257ce3a51e4fc9ee8a24ed428c4.png)

`

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [September 13, 2023, 8:24am UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838/3 "2023-09-13T08:24:44Z")

</div>

What is the username you are trying to use?

---

<div class="post-metadata">

**Author:** ![Mir.Pasha](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Mir.Pasha](https://community.cumulocity.com/u/Mir.Pasha)\
**Post date:** [September 13, 2023, 8:36am UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838/4 "2023-09-13T08:36:08Z")

</div>

[musthafa.pasha@royalcyber.com](mailto: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.

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [September 13, 2023, 9:38am UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838/5 "2023-09-13T09:38:13Z")

</div>

Have you a link to the article you mention?

---

<div class="post-metadata">

**Author:** ![Mir.Pasha](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Mir.Pasha](https://community.cumulocity.com/u/Mir.Pasha)\
**Post date:** [September 13, 2023, 12:16pm UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838/6 "2023-09-13T12:16:46Z")

</div>

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

> [@webMethods.io Integration: create a Cumulocity IoT trigger](https://community.cumulocity.com/t/webmethods-io-integration-create-a-cumulocity-iot-trigger/7367):
>
> Overview This article describes the step-by-step process to create a Cumulocity IoT trigger in [webMethods.io](http://webmethods.io/) Integration. For the creation of Cumulocity IoT connectors, please refer to the document [Create a Cumulocity IoT Connector](https://community.cumulocity.com/t/building-system-integrations-with-the-new-cumulocity-iot-connector-for-webmethods-io/3517/1)Prerequisites The user needs Cumulocity IoT credentials having admin permissions for “Application management”. Working [webMethods.io](http://webmethods.io/)Integration cloud tenant. The target Cumulocity IoT tenant must support the Notification 2.0 Enhancements (see [Cumulocity IoT Noti…](https://community.cumulocity.com/t/introducing-some-cumulocity-iot-notification-2-0-enhancements/3964)

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [September 13, 2023, 12:55pm UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838/7 "2023-09-13T12:55:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mir.Pasha](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Mir.Pasha](https://community.cumulocity.com/u/Mir.Pasha)\
**Post date:** [September 13, 2023, 2:16pm UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838/8 "2023-09-13T14:16:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [September 13, 2023, 2:30pm UTC](https://community.cumulocity.com/t/webmethods-io-integration-create-an-account-for-a-connection-to-cumulocity-iot/3838/9 "2023-09-13T14:30:30Z")

</div>

This from the [webmethods.io](http://webmethods.io) documentation.  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/optimized/2X/5/55cb4164a2b160f0ee52eef9d47703742d77a75f_2_690x57.png)
