Microsoft Teams

The JSSP-based Microsoft Teams connector allows you to create, update, list, and read objects in Microsoft Teams, including: teams, channels, tabs, and apps. . You can obtain the Microsoft Teams JSSP Connector from GitHub at https://github.com/k2workflow/Microsoft-Teams-Connector. See the ReadMe.md file in this GitHub repository for information on installing and configuring the connector in your environment.

What you can do with the Microsoft Teams connector

A team in Microsoft Teams is a container for channels and tabs. Apps functionality is limited to listing available apps that can be added as a tab in a channel

The following operations are available in the Microsoft Teams connector:

  • Retrieve a list of teams that someone is a member of
  • Retrieve a list of all teams available in an environment
  • Maintain a team, such as get details about a team, update a team, add and remove members, add owners, archive a team and unarchive a team
  • Create, update, delete channels and tabs within channels

  • Send a message to a channel

The following operations are not available:

  • Delete a team using the connector
  • Install new apps
  • Get messages in a channel

Permissions

Microsoft Azure Active Directory is now Microsoft Entra ID

The Azure Active Directory app that you create requires Graph permissions to both Groups and Teams objects. Since teams are associated with groups and email addresses, performing operations in Microsoft Teams through this service and SmartObjects requires these Graph API Permissions to function. Sending a message to a channel requires the Group.ReadWrite.All Graph API permission. This is a Microsoft Azure requirement that the product does not control. See the table below for the Azure/Graph API Permissions required for each method, and refer to the section Creating the Azure App and Add Permissions in the Readme.md file for details on the required API permissions.

Register a Microsoft Teams connection

To register a connection of the Microsoft Teams connector you must first access the connector using the GitHub repository. The repository contains a readme.md file where the following is detailed:

  • Creating the Azure App (setting the proper permissions, copying the client ID, and generating a secret)
  • Creating the OAuth Resource

  • Registering a Microsoft Teams connector
  • Creating an instance of the Microsoft Teams connector

Service Objects

The connector exposes the following Service Objects: App, Channel, Tab and Team. See the tables below for details on the properties and methods of each Service Object.

SmartObjects

The following SmartObjects are created when you check the Generate SmartObjects for this Service Instance option at the bottom of the Create Service Instance page, or use the Generate SmartObjects button when you have the service instance selected. You can then use these SmartObjects in SmartForms and workflows. You can also use the advanced mode SmartObject designer to create your own SmartObjects for the Service Objects exposed by the Teams Service Type. .

Considerations

  • When creating custom steps for the Microsoft Teams connector in the Workflow Designer for specific methods of this connector, you can use the following icons in the Icons folder of the readme.md file for the following methods:
    • Send Message to Channel
    • Create Team
    • Update Team
    • Create Channel
  • Remember to check the Cache OAuth token for the service account for using SmartObjects in workflow steps option when you register the connection.
    • When selecting the "Cache OAuth token..." option, the retrieved token is saved against the Service account. You may have signed in with your credentials to retrieve the token, but the token that is retrieved through the OAuth flow is saved against the service account. When a workflow executes a Teams-based SmartObject, the service uses the cached/saved token to make the call to the MS Teams API.
    • The OAuth token will expire after some interval (typically 1 hour). Once the cached token has expired, you may encounter messages like "Service: MS_Teams_JSSP Severity: Error Error Message: Forbidden: Forbidden". To refresh the cached token, you must refresh the Service Instance.
  • Adding an Owner to a team and then adding them as a Member of the team might remove them from the Owners role in the Teams app, but they still have owner rights. This is an issue with the way the Graph API works.