DEV Community

Mariela Dimitrova for Software AG Tech Community

Posted on • Originally published at tech.forums.softwareag.com on

Configuring Azure Service Bus account in webMethods.io Integration Workflow

Configure Account on Azure Portal

  1. On the home page of the Azure portal, click on Create a resource image
  2. On the next page search for Service Bus and open the service
  3. Click on Create button to create new Service Bus resource image
  4. Fill in the required details and click on Review + create image Note: For details on pricing follow the link.
  5. On the next screen click on Create button image
  6. Once the resource is created, we need to create the app. Navigate to Azure Active Directory and click on App registrations image
  7. Click on Add to create a new app image
  8. Fill in the details as below and click on Register : image
  9. Copy Client ID, Object ID and Tenant ID for later use. Then Click on Add a certificate or secret image
  10. Click on New client secret then add a Description and select the appropriate option for Expires. Click on Add button image
  11. Copy Value and Secret ID We will be using Value as our Client secret image
  12. Now we need to configure proper permissions for this app to access the service bus resource. Click on Overview->View API permissions image
  13. Click on Add a permission, then APIs my organization uses and search for Microsoft.ServiceBus image Click on Add permissions button image
  14. Click on Grant admin consent for … Click on Yes. image On successfully granting the consent, you will get a success message on the screen image

Generate Refresh Token

  1. Update below URL with your TenantID and ClientID and paste the url on browser https://login.microsoftonline.com/<TenantID>/oauth2/authorize?response_type=code&prompt=login&redirect_uri=https://www.google.com/&client_id=<ClientID> Follow on screen authentication process and once authentication is complete you will get response back on the browser address bar. The response will look like this: https://www.google.com/?code=\<AuthCode>&session_state=\<SessionState> AuthCode is set of alphanumeric character of length ~750 chars. Copy the auth code for future use.
  2. Create postman collection as below: image
URL: `https://login.microsoftonline.com/<TenantID>/oauth2/token`

client_id: <Client ID>

grant_type: authorization_code

code: <Auth code copied in above step>

redirect_uri: https://www.google.com/

resource: https://servicebus.azure.net

client_secret: <Client secret>
Enter fullscreen mode Exit fullscreen mode

In response you will get Access token and Refresh Token. Access token will be valid for 30 minutes, but Refresh Token can be used later to regenerate access token.

Add account on wmio

  1. To Add a new account, navigate to your project on wmio, click on connectors tab and search for Microsoft Azure Service Bus, select Custom OAuth and click on Next. image
  2. Fill in all the required fields: image
Server Url: `https://<resource_name>.servicebus.windows.net`
Refresh Url: `https://login.microsoftonline.com/<TenantID>/oauth2/token`
Enter fullscreen mode Exit fullscreen mode

Once the connection is created, we can test an operation by creating a workflow or flow service.

Simple Example

  1. In this example we will send a simple message to a service bus queue already available in Azure portal (Alternatively, we can create a queue/topic using predefined operations) Search for Azure servicebus connector and drag & drop to the editor. image
  2. Open settings for the connector and fill in the details as below, click Next. image
  3. Add path and body as below image
  4. Click on next, then done and save the workflow. Click on the Run button. image

Response:

image

Read full topic

Top comments (0)