Configuring Applications for the Microsoft Teams SyncPack

Download this manual as a PDF file 

This section describes how to set up the run book automations in Skylar One and how to configure the Skylar Automation (formerly PowerFlow) applications in the "Microsoft Teams" SyncPack

Workflow for Configuring the SyncPack

The following workflows describe how to configure Microsoft Teams, Skylar One, and Skylar Automation to work with the "Microsoft Teams" SyncPack.

Configuring Microsoft Teams

  1. See the steps in Configuring Microsoft Teams, below.

Configuring Skylar One

  1. Create a SOAP/XML credential to access Skylar Automation
  2. Edit the Microsoft Teams run book actions
  3. Enable the Microsoft Teams run book automations

Configuring Skylar Automation

  1. Create and align a Skylar Automation configuration object
  2. Configure the Microsoft Teams Skylar Automation applications
  3. Schedule the Skylar Automation applications

Configuring Microsoft Teams

To configure Microsoft Teams to work with Skylar Automation, you must register an application in Azure Active Directory and perform some configuration steps for that application before using the "Microsoft Teams" SyncPack. To configure the application:

  1. Follow the steps in the Microsoft documentation to register your application in Azure Active Directory.
  2. Note the "app_id(client_id)", "client_secret", and "tenant_id" of your application.

The "client_secret" value of your application will only be visible immediately after creating it, so be sure to copy it somewhere safe before continuing.

  1. Grant the following scoped permissions to the application:
  • Channel.Create
  • ChannelMessage.Send
  • Channel.ReadBasic.All
  • offline_access
  • openid
  • User.Read
  • User.Read.All
  1. Ensure the following Microsoft Graph permissions are assigned to allow proper functionality of the SyncPack:
API/ Permissions Name Type Description Administrator Consent Needed
Channel.Create Application Create channels Yes
ChannelMessage.Read.All Delegated Read user channel messages Yes
ChannelMessage.Read.All Application Read all channel messages Yes
ChannelMessage.ReadWrite Delegated Read and write user channel messages Yes
ChannelMessage.Send Delegated Send channel messages No
email Delegated View users' email address No
openid Delegated Sign users in No
profile Delegated View users' basic profile No
User.Read Delegated Sign in and read user profile No
User.Read.All Application Read all users' full profiles Yes

 

  1. Ensure the following Power Automate permissions are assigned to allow proper functionality of the SyncPack:
API/ Permissions Name Type Description Administrator Consent Needed
Activity.Read.All Delegated Allow the application to read activities No
Flows.Read.All Delegated Allow the application to read flows No
User Delegated Access Microsoft Flow as signed in user Yes

Required Licenses and Configuration

The following licenses and access permissions are required in order to configure the workflows necessary for the sync between Microsoft Teams and Skylar One:

  • Power Automate Premium License. This is required for building and automating workflows, such as posting adaptive cards based on webhook events and processing responses.
  • Administrator access to the Skylar One Administration Portal and Microsoft Teams. This is required to configure and manage workflows across both platforms.
  • Skylar One Integration/Automation License (if required). Depending on how Skylar One is being integrated, specific licensing may be needed for automation or API integration with third-party services like Microsoft Teams.

Additional Configuration Required:

  • Ensure that all required IP addresses are added to the firewall rules and that the rules are enabled to allow communication between the necessary services.

  • The workflow app must be added to Teams or Power Automate, which requires administrator approval. Your admin team should assist with this approval.

Configuring the Microsoft Teams Sender Workflow

The purpose of the sender workflow is to receive events from Skylar Automation and post one or more adaptive cards to a Microsoft Teams channel.

To configure the Microsoft Teams sender workflow:

  1. In Microsoft Teams, navigate to the required team and select the target channel.

  2. Click the three dots icon next to the channel name.

  3. Click Workflows. Microsoft Teams redirects you to the Power Automate workflow page with the team and channel pre-selected.

  4. Click Build from scratch. The New workflow page appears.

  5. Select Build with Power Automate to see more triggers from the When /select a trigger drop-down field. The Build in Power Automate modal appears.

  6. Click Go to Power Automate. The workflow builder appears.

  7. In the Trigger search field, search for and select When a Teams webhook request is received.

  8. Click the + New step button.

  9. In the Search connectors and actions field, search for and select Apply to each.

  10. Click the three dots icon and select Rename from the drop-down field.

  11. Enter Send Each Adaptive Card and press Enter on your keyboard.

  12. In the Select an output from previous steps drop-down field, select Attachments.

  13. Click Add an action.

  14. In the Search connectors and actions field, search for and select Post card in a chat or channel.

  15. Leave the default value of Flow bot in the Post as field.

  16. Select Channel from the Post in field.

  17. Select Enter custom value from the Team drop-down field.

  18. Click the Expression tab and enter the following:

    items('Send_Each_Adaptive_Card')?['tid']

  19. Click Ok. The expression is added to the Team field.

  20. Select Enter custom value from the Channel drop-down field.

  21. Click the Expression tab and enter the following:

    items('Send_Each_Adaptive_Card')?['chid']

  22. Click Ok. The expression is added to the Channel field.

  23. Select Adaptive Card from the Adaptive Card drop-down field.

  24. Click Show advanced options.

  25. Define a unique identifier such as service name or alert type in the Card Type ID field.

The value defined in the Card Type ID field must be reused in the response workflow.

  1. Click Save.

  2. Open the When a Teams webhook request is received. trigger

  3. Copy the HTTP Post URL and paste it into the ms_teams_webhook_url field in the configuration object in Skylar Automation.

Configuring the Microsoft Teams Response Workflow

The purpose of the receiver workflow is to capture user responses from adaptive cards in Microsoft Teams and send them back to Skylar Automation for processing, and forwarding to Skylar One.

To configure the Microsoft Teams receiver workflow:

  1. In Microsoft Teams, navigate to the required team and select the target channel.

  2. Click the three dots icon next to the channel name.

  3. Click Workflows. Microsoft Teams redirects you to the Power Automate workflow page with the team and channel pre-selected.

  4. Click Build from scratch. The New workflow page appears.

  5. Select Build with Power Automate to see more triggers from the When /select a trigger drop-down field. The Build in Power Automate modal appears.

  6. Click Go to Power Automate. The workflow builder appears.

  7. In the Trigger search field, search for and select When someone responds to an adaptive card.

  8. In the Card Type ID field, enter the exact value used in step 25 of the Microsoft Teams Sender Workflow.

  9. Click the + New step button.

  10. In the Search connectors and actions field, search for and select HTTP.

  11. Complete the following fields:

    • Method. Select Post from the drop-down field.

    • URI. Enter the Skylar Automation intermediary URL.

    • Headers. In the key field, enter Content-Type. In the value field, enter application/json.

    • Body. Click the field. In the modal that appears, click the Expression tab and enter the following:

    addProperty(triggerBody()?['entity']?['cardOutputs'], 'user', triggerBody()?['entity']?['teamsFlowRunContext']?['messagePayload']?['from']?['User']?['Id'])

  12. Click Save.

Configuring Skylar One

The following topics cover how to set up your Skylar One instance to work with the "Microsoft Teams" SyncPack.

Creating a SOAP/XML Credential to Access Skylar Automation

You will need to create a SOAP/XML credential so that the action policies included in the "Microsoft Teams Automations" PowerPack can access your Skylar Automation (PowerFlow) system.

The PowerPack includes the "PowerFlow Microsoft Teams" credential, which you can use as a template for the SOAP/XML credential.

To define a SOAP/XML credential using the example credential:

  • In Skylar One, go to the Credentials page (Manage > Credentials).
  • Click the wrench icon () for the "PowerFlow Microsoft Teams" credential. The Credential Editor modal window appears.
  • Complete the following fields:
  • Profile Name. Type a new name for the credential.
  • URL. Type the URL for your Skylar Automation system.
  • HTTP Auth User. Type the username for your Skylar Automation system.
  • HTTP Auth Password. Type the password for your Skylar Automation system.
  1. Click Save & Close.
  2. Take note of the Skylar One-assigned ID number for the new credential on the Credentials page, in the ID column. You will need the ID number when editing the input parameters of the run book actions included in the PowerPack, below.

Editing the Microsoft Teams Run Book Actions

The "Microsoft Teams AutomationsPowerPack includes three run book actions that use the "Run Integration Service Application" action type to trigger the Skylar Automation applications that send and receive data to and from Microsoft Teams. You can specify the credential ID in a JSON structure that you enter in the Input Parameters field in the Action Policy Editor modal.

After you edit the action and trigger the event policy, the new event log will be added to the respective device on the Event Console page.

To edit the actions included in the PowerPack:

  1. In Skylar One, go to the Actions page (Registry > Run Book > Actions).
  2. Locate the automation action that you want to use, and then click its wrench icon (). The Editing Action page appears.
  3. In the Input Parameters field, change the values of the following parameters:
  • credential_id. Change the value to the credential ID that you noted earlier when creating a credential for your Skylar Automation system. This parameter is required.
  • include_event. Leave the value as "true".
  • application_name. Leave the default application value.
  • params. Leave the default parameter value.
  1. Make sure the Action State is set to Enabled, and then click Save.

Enabling the Microsoft Teams Run Book Automations

The "Microsoft Teams AutomationsPowerPack includes three run book automation policies that you will need to enable.

These policies update the Microsoft Teams alert or Skylar One event with the state of the associated event or alert, create a maintenance object, or populate Skylar One with on-call details. When the event is first detected in Skylar One or Microsoft Teams, the "triggered" state is sent. When the event is acknowledged in Skylar One or Microsoft Teams, the "acknowledged" state is sent. When the event is cleared in Skylar One or Microsoft Teams, the "resolved" state is sent. When the on-call policy is triggered, on-call details are added to the Skylar One event notes. When a maintenance object is required, a maintenance object is created in Microsoft Teams.

The following table shows the automation policy, its aligned events, and the automation action that runs in response to the events.

Automation Policy Name Aligned Events Automation Action
Microsoft Teams: Create Channel (All Events) Microsoft Teams: Create Channel
Microsoft Teams: Create Channel Notification - Acknowledge (All Events) Microsoft Teams: Created Channel Notification - Acknowledge
Microsoft Teams: Create Channel Notification - Clear (All Events) Microsoft Teams: Create Channel Notification - Clear

 

To enable the run book automation policies:

  1. In Skylar One, go to the Automation page (Registry > Run Book > Automation).
  2. Locate a Microsoft Teams automation policy and click its wrench icon (). The Automation Policy Editor page appears.
  3. Update the following fields:
  • Policy State. Select Enabled.
  • Policy Priority. Select High to ensure that this Skylar Automation automation policy is added to the top of the queue.
  • Available Actions. If it is not already selected, select the "Run Integration Service Application: <name>" action that corresponds with the Ansible automation policy you selected in step 2, and click the arrows to move it to Aligned Actions.

ScienceLogic highly recommends that you do not make changes to the Policy Type, Repeat Time, or Align With fields or the And event is NOT acknowledged setting.

  1. Click Save.
  2. Repeat steps 2-4 for the remaining Microsoft Teams run book automation policies.

Configuring Skylar Automation

The following topics cover how to set up your Skylar Automation instance to work with the "Microsoft Teams" SyncPack.

Creating a Configuration Object

A configuration object supplies the login credentials and other required information needed to execute the steps for a Skylar Automation application. The Configurations page () of the Skylar Automation user interface lists all available configuration objects for that system.

You can create as many configuration objects as you need. A Skylar Automation application can only use one configuration object at a time, but you can use (or "align") the same configuration object with multiple applications.

For this SyncPack, you can make a copy of the "Sample Microsoft Teams Config" configuration object, which is the sample configuration file that was installed with the Microsoft Teams  SyncPack.

The "Sample Microsoft Teams Config" configuration object contains all of the required variables. Simply update the variables from that object to match your Skylar One and Microsoft Teams settings.

To create a configuration object based on the "Sample Microsoft Teams Config" configuration object:

  1. In the Skylar Automation user interface, go to the Configurations page ().
  2. Click the Edit button for the "Sample Microsoft Teams Config" configuration object. The Configuration pane appears.
  3. Click Copy as. The Create Configuration pane appears.
  4. Complete the following fields:
  • Name. Name of the configuration object that will display on the Configurations page.
  • Description. A brief description of the configuration object.
  • Author. User or organization that created the configuration object.
  • Version. Version of the configuration object.
  1. In the Configuration Data Values fields, update the default variable definitions to match your Skylar Automation configuration:
  • sl1_host. The hostname or IP address of the Skylar One system the alerts will synchronize to.
  • sl1_user. The username for your Skylar One system.
  • sl1_password. The password for your Skylar One system.
  • client_id. The ID of the registered app in Azure Active Directory.
  • client_secret. The secret code given for the corresponding app in Azure Active Directory.
  • tenant_id. Tenant ID of the Azure Active Directory.
  • team_id. ID of your team in Microsoft Teams.
  • channel_id. Provide the channel ID if you want to enable sending messages to existing channels. Otherwise, this field is optional.

To retrieve the "team_id" and "channel_id" values, see the Retrieving the Team ID and Channel ID from a Team section.

  • ms_teams_webhook_url. The HTTP Post URL from the sender workflow you created in Microsoft Teams.
  • microsoft_user_ids. Microsoft Teams user ID used for group calling. For a group call, enter multiple user IDs in your Skylar Automation configuration separated by commas. For example:
  • {

    "encrypted": false,

    name":"microsoft_user_ids",

    "value": "dce672e6-c430-43f9-b17e-bfe07e51816d,30127c40-12b3-436b-8523-115d3b814ea9"

    }

    To retrieve the "microsoft_user_ids" value see the Retrieving the Object ID from your Azure Active Directory Application section.

  • default_ack_user. The email address of the default user to acknowledge events and alerts.
  • intermediary_url. URL endpoint of the intermediary between Microsoft Teams and Skylar Automation for sending user interaction data.
  • region. This is used for saving the Skylar One user data to cache.
  1. Click Save. You can now align this configuration object with one or more applications.

Updating the Configuration Object to Send Messages to an Existing Team Channel

You can configure the Microsoft Teams SyncPack to send messages to any existing team channel in Microsoft Teams:

  1. In the configuration object, enter the channel ID of the existing Microsoft Teams channel where you want to send Skylar One event messages in the channel_id field.

  2. Toggle on (blue) the enable_existing_channel configuration option. This setting allows the SyncPack to send messages directly to the pre-defined channel instead of creating a new one.

  3. Click Save. You can now align this configuration object with one or more applications.

Aligning a Configuration Object and Configuring Skylar Automation Applications

With this SyncPack, any status changes made to a Skylar One event are sent to Microsoft Teams to update the corresponding alert. Any status changes to the Microsoft Teams alert are synced back to the corresponding Skylar One event. You will need to align the Microsoft Teams applications with the relevant configuration object in Skylar Automation, and, if needed, update any other fields on the Configuration pane for the applications.

To run this SyncPack, you must "align" the configuration object to run with the following Skylar Automation applications:

  • Create Channel For Event
  • Sync Event Status From Teams to Skylar One

To align the configuration object with the relevant Skylar Automation applications:

  1. On the Applications page of the Skylar Automation user interface, open one of the Skylar Automation applications listed above and click Configure (). The Configurations pane for that application appears.

  1. From the Configurations drop-down, select the configuration object you want to use.

    The values and other parameters that appear in the Configuration pane with a padlock icon () are populated either by the configuration object you aligned with the application or by the Run Book Action. Do not modify these values. If you encounter an error, make sure your Run Book Action is configured properly.

  1. Click Save to align that configuration with the application.
  2. Repeat this process for the other Skylar Automation applications.

Using Microsoft Teams to Receive and Respond to Event Messages

When events are created in Skylar One and notifications are sent to the Microsoft Teams channel, an adaptive card displays in the Microsoft Teams channel with event details and action buttons to respond to the event. You can respond to an event notification in Microsoft Teams to be updated in Skylar One by adding a note, acknowledging the event, or resolving it. Upon taking action on the event from the adaptive card (Acknowledge, Add Note, or Resolve), the selected action is sent to Skylar One to update the event status.

Currently, syncing event updates from Skylar One to Microsoft Teams is not supported. This is planned as a future enhancement to keep Microsoft Teams updated with the latest event state from Skylar One.

Responding to Event Messages

When an event is posted in Teams, you can view details of the event, such as the Event ID, Event Severity, and more. You can respond to the event in Teams, to be updated in Skylar One by adding a note, acknowledging the event, or resolving it:

  • Add Note to Skylar One Event: Click this button, type the note you want to add to the event and press Enter. The note will be added to the event in Skylar One.
  • Acknowledge: Click this button to acknowledge the event in Skylar One.
  • Resolve: Click this button to resolve the event in Skylar One.

Configuring Time Zone of Event Messages

By default, Microsoft Teams uses your local time zone. If you want to change the time zone to UTC or any other time zone, see Microsoft Teams' official documentation for instructions on changing the time zone.

Skylar One follows a structured format when sending event details to Skylar Automation. Below is an example of an event payload generated when an event is created and the MS Teams automation is triggered:

{ "app_name":"create_teams_channel_for_event", "app_vars":{ "event_details":{ "%D":"2025-02-06 11:08:29", "%d":"2025-02-06 11:08:29", "%M":"CRITICAL: test 11", "%N":"Microsoft Teams: Create Channel", "%S":"CRITICAL" }, "team_id":"${config.team_id}", "tenant_id":"${config.tenant_id}" } }

The event_details section contains two key timestamps, both of which are in UTC format by default:

  • %D (First Detected Time). Represents the initial event occurrence.

  • %d (Last Detected Time). Represents the most recent occurrence.

To modify the time zone format from the Skylar One side, update the Skylar One server time zone settings. For more information on changing the time zone settings, see the Skylar One System Administration manual.