...
Microsoft Teams is a collaboration app that helps teams stay organized and have conversations. This Universal Extension provides the capability to monitor a Microsoft Teams channel for uploaded files and run job(s) and/or workflows accordingly.
Template Name | Extension Name | Version |
---|---|---|
Microsoft Teams: Monitor Channel | ue-msteams-monitor | 1.0.3 |
Refer to the Changelog for version history information.
Software Requirements
This integration requires a Universal Agent and a Python runtime to execute the Universal Task. Requires Python version 3.7 .0 or higher. Tested with the Universal Agent bundled Python distribution.3.11
Software Requirements for Universal Agent
...
Universal Agent for Windows x64 Version 7.0.0.0 and later with python Python options installed.
Universal Agent for Linux Version 7.0.0.0 and later with python Python options installed.
Software Requirements for Universal Controller
...
This Universal Task requires that Universal Controller property Web Service Default Response Content (uc.web_service.response.content.default) is set to JSON.
...
An application must be registered in the Azure Active Directory. See official instructions on Quickstart: Register an application with the Microsoft identity platform
Use as "Supported account Account Types" option "Accounts in this organizational directory only".
When registration finishes an Application (client) ID is generated (required as part of Extension Task configuration).
Configure API permissions.
...
Support authentication to Microsoft Teams with Oauth2 protocol for Grant Type Resource Owner Password Credentials (aka "Password Credentials").
For a specific Microsoft Teams Channel, periodically poll all the new messages since the last lookup.
For each fetched message having attachments, launch a task in Universal Controller with variables holding the list of attachments' SharePoint URLs, names, and a message summary.
Support for up to 5 attached files (any additional additional files are skipped).
Ability to resume from the last read message on restart.
Different Log levels for the Universal task, with DEBUG level providing more information in case of issues.
Universal task instance must be stopped with Force Finish/Cancel command to avoid leaving a running monitor process.
The scope is to support the exchange of files on a dedicated Microsoft Teams channel that will act as a service channel.
To share a file, a conversation is created with the file being attached. It is not expected that anyone will react or reply to this message.
...
Actions and replies on the channel conversations are not supported.
Only returns channel conversations within the last eight months.
Incremental read reading of new messages is relying relies on a delta token from the API. Its opaque value, which is opaque, must be kept in a variable to allow for it to resume between between runs. See how to configure the task in the example section below.
...
Parameter | Type | Description |
---|---|---|
attachment_urls | Large Text (JSON) | The list of the attachment URLs (as SharePoint URLs) , in JSON format. |
attachment_names | Text (JSON) | The list of the attachment names (as listed on the message) , in JSON format. |
message_summary | Text (JSON) | A summary of the message information in JSON format: modified date, sender, and message idID. |
Example: attachment_urls
...
Field | Type | Preserved on re-run | Description |
---|---|---|---|
Last Modified Date Time | Text | True | The last modified date time on the last modified message (the maximum value in case of 'Run forever'). |
Offset Token | Large Text | True | Tracker for the last read message from the channel. |
Outstanding Message | Boolean | True | Shows whether there are more messages to be read from the channel. |
Launched Task | Text | True | The sysID (32 char) of the last launched task as returned by UAC REST API. |
Message Count | Text | False | The number of fetched message messages since the start of the monitoring (task instance). |
Task Count | Text | False | The number of launched tasks since the start of the monitoring (task instance). |
...
The exit codes for this Universal Extension are described below.
Exit Code | Status Classification Code | Status Classification Description | Status Description |
---|---|---|---|
2 | AUTHENTICATION_ERROR | Bad Authentication data | AUTHENTICATION_ERROR: Incorrect username or password. |
3 | AUTHORIZATION_ERROR | Insufficient Permissions | AUTHORIZATION_ERROR: The authorization credentials provided for the request are invalid. |
20 | FOREIGN_API_REQUEST_ERROR | Bad request to third-party API | FOREIGN_API_REQUEST_ERROR: Bad request to Microsoft API. |
21 | FOREIGN_API_RESPONSE_ERROR | Validation error response from third-party API | FOREIGN_API_RESPONSE_ERROR: Microsoft API response validation error. |
22 | LAUNCH_TASK_EXEC_ERROR | Error while launching a Task in UAC REST API | LAUNCH_TASK_EXEC_ERROR: Error while launching a task. |
Task Examples
Follow the steps below to create a Task.
...
The offset is kept between the task executions and allow allows to resume from the last read message on that channel.
...
Name | Location | Description |
---|---|---|
Universal Templates | User documentation for creating Universal Templates in the Universal Controller user interface. | |
Universal Tasks | User documentation for creating Universal Tasks in the Universal Controller user interface. | |
Credentials | User Documentation for Credentials Details Field Description. | |
Launch a Task | User Documentation for Launching a Task. | |
Force Finish/Cancel | User Documentation for Cancelling a Task. | |
Azure Active Directory | https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app | Register an application with the Microsoft identity platform. |
Properties | User Documentation for all Universal Controller properties. |
Changelog
ue-msteams-monitor-1.0.3 (2024-03-07)
Enhancements
- Added: Support for Python 3.11.
ue-msteams-monitor-1.0.2 (2022-03-30)
Enhancements
- Added: Update of Extension Icon
ue-msteams-monitor-1.0.1 (2021-12-13)
Enhancements
- Added: Skip a given number of MSTeams messages on task startup
- Added: Skip message when type is unknownFuture (channel system events
Fixes
- Fixed: STDOUT is not always printed on with UAG 7.0
- Fixed: Returned correct message for HTTP errors from UAC API.
- Fixed: Fixed the returned number of attachments when the message has more than 5 attachments.
- Fixed: Returned correct error for invalid REST UAC Credentials
ue-msteams-monitor-1.0.0 (2021-10-14)
Initial Release