...
Universal Controller Version 7.0.0.0 and later.
This Universal Task requires that Universal Controller property /wiki/spaces/UC71x/pages/5177877 (uc.web_service.response.content.default) is set to JSON.
Network and Connectivity Requirements
...
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 4 5 attached files (any 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.
...
Field | Input type | Default value | Type | Description |
---|---|---|---|---|
Action | Required | Monitor Attachments | Choice | The action performed upon the task execution |
Client Credentials | Required | - | Credentials | The credentials for the application registered in the Azure Active Directory. They are comprised of:
|
Resource Owner Credentials | Required | - | Credentials | The user's credentials for Microsoft 365. They are comprised of:
|
Channel Identifier | Required | Channel Link | Choice | The Type of identifier for the channel. For example: Channel Link to provide the URL |
Channel Link | Optional | - | Text | The URL link of the required channel. Required if Channel Identifier is "Channel Link". |
Interval (seconds) | Optional | 60 | Integer | The Message Polling Interval in seconds. |
Universal Controller URL | Required | - | Text | Universal Controller URL. For example: http://192.168.88.10:8080/uc |
Universal Controller Credentials | Required | - | Credentials | The Universal Controller Credentials. The Credentials must have “Web Service Access” Permissions. |
Launch Task | Required | - | Text | The name of the Task to be launched in the Universal Controller. The task will always be launched with the Task variable {attachment_urls} which contains the SharePoint URLs list of the attachments in JSON format. |
Offset Token | Optional | - | Large Text | Tracker for the last read message from the channel. It can be set to the previous instance run execution with the output parameter offset_token. By setting it, it allows it to resume from the last read message. |
Skip Messages | Optional | 0 | Integer | The number of messages to be skipped at the start of the Universal Task. |
Launch Task Variables
The Variables that are passed to the launched task are described below.
...
Exit Code | Status Classification Code | Status Classification Description | Status Description | 0 | SUCCESS | Successful Execution | SUCCESS: Task executed successfully.|
---|---|---|---|---|---|---|---|
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. |
Extension Output
...
. |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"exit_code": 0,
"status_description": "SUCCESS: Monitor successfully stopped",
"changed": true,
"invocation": {
"extension": "ue-msteams-monitor",
"version": "1.0.0",
"fields": {
"channel_link": "https://teams.microsoft.com/l/channel/CHANNEL_ID/CHANNEL_NAME?groupId=TEAM_UD&tenantId=TENANT_ID",
"client_credentials": { "user": "client id" }
"resource_owner_credentials": { "user": "teams_user" }
"base_url_uac": "https://uac",
"rest_credentials_uac_user": { "user": "uac_user" }
"launch_task": "taskname",
"last_modified_date_time_initial": null,
"offset_token_initial": "$deltatoken=8UusBixEHS9UUau6uGcryrA6FpnWwMJbuTYILM1PArECpCD49uumD4nlK5kAKJqsKPJffXui-5I_Sld8nLCejtQyjajdRtMePkRlW1MucwmUN7pRaNTlD-rQRutheY9O.e_LhoixSBx6Nmedv1MqQOwyuvCski_nNc7EwBnKMqrM",
"max_attachments": 1,
"message_summary_fields": "lastModifiedDateTime;id;from.user.displayName"
},
},
"result": {
"last_modified_date_time": null,
"offset_token": "$skiptoken=8UusBixEHS9UUau6uGcryrA6FpnWwMJbuTYILM1PArFtce2DKTr7UaTvDKnrXd26ju5BcbHo060wtEKBe03raXZYf80_t28mp7BvlrZ1wPn9wimBPmHzfWLq7ZzEbC4k.2CpXd6SbknUQQVOeM82iQKsDSwVtvk6T9OPZvbmUoAI",
"outstanding_message": true,
"last_launched_task_id": "UAC task id"
"message_count": 7,
"task_count": 6
}
} |
Task Examples
Follow the steps below to create a Task.
...
Name | Location | Description |
---|---|---|
Universal Templates | https://docs.stonebranch.com/confluence/display/UC71x/Universal+Templates | User documentation for creating Universal Templates in the Universal Controller user interface. |
Universal Tasks | https://docs.stonebranch.com/confluence/display/UC71x/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. |
Universal Controller Properties | https://docs.stonebranch.com/confluence/display/UC71x/Universal+Controller+Properties | User Documentation for all Universal Controller properties. |