Now you can communicate with your employees via Teams!

This document provides detail on how Enboarder will interact with Microsoft Teams to send new hire notifications to a company channel and proactive messages to users, including the endpoints and configuration required. We are using the Microsoft Bot framework Rest API to send messages.

Pre-requisite

  • The organization must have an admin account in Microsoft Teams and all Azure AD users must have permissions to Team General channel
  • The admin user must install the Enboarder APP in Microsoft Teams
  • To configure tile, the user needs to follow the below steps to get TenantID, Bot ID, and secret key.

Get Tenant ID

Before configuring the tile, please follow below steps and note down the below information:

  • TenantID
  • ChannelID

Login to your account and click into the 'Teams' tab. Right-click on the channel where you want to send the message. Click on Get link to General channel

Click, to copy and paste into notepad

It will look something like this

https://teams.microsoft.com/l/channel/19%3A2a53a6DDDDbec04ff89ee9a12a46577dc6%40thread.tacv2/General?groupId=c0581343-663e-42e8-a13d-3f67336dad1a&tenantId=680d22e1-e6f7-4ed7-8e9e-XXXXXXXXXXXX

The channel ID is 19%3A2a53a6DDDDbec04ff89ee9a12a46577dc6%40thread.tacv2

And the tenantID is 680d22e1-e6f7-4ed7-8e9e-XXXXXXXXXXXX

Please note down these values for future reference

Setting up the Microsoft Tile in Enboarder

Here are the steps for Integration:

  • Login as an admin user and go to Settings → Integration → App center
  • Click on the tile Microsoft Teams (or search if you can't see it)
  • Click on the Add Integration button.
  • On the next screen, enter the tenant id which you noted in the previous step and click on Integrate Now.
  • When successful authentication has been reached, the user will be redirected to the Enboarder site and the "Microsoft Teams" tile will be shown as Pending.

Install Enboarder App and add bot to team

Install Enboarder App

Click on the Apps icon on the bottom left pane. Then either search the App by typing enb or enboarder. Alternatively, you can click into the 'Human resources' category and browse for the Enboarder App.

Now click on the Enboarder App. You will see the detail page. On the detail page click on the “Add to a team” option from the dropdown menu.

Search for General channel and add it to the team.

Once the bot is added in Teams, send a ‘Hi’ message to the Enboarder bot, and the tile will show as Integrated in Enboarder.

Now you can send a notification to MSTeam from Enboarder. On new hire notification, the message will look like the below:

Note - The email ID of employee in Enboarder which you want to send notification should be the user ID of MSTeam.

Send a message to a channel using a webhook

Basic information required to send a message

Before sending a message using api, please login to your Microsoft account and note down below information

  • ChannelID

Login to your account and go to the Teams tab. Right click on the channel where you want to send the message. Click on Get link to channel

Click to copy/paste into notepad

It will look something like this

https://teams.microsoft.com/l/channel/19%3A2a53a6b4bec04ff89ee9a12a46577dc6%40thread.tacv2/General?groupId=c0581343-663e-42e8-a13d-3f67336dad1a&tenantId=680d22e1-e6f7-4ed7-8e9e-5566ec1055b8

The channel ID is 19%3A2a53a6b4bec04ff89ee9a12a46577dc6%40thread.tacv2

Send message to channel API

Sending messages to channel

URL - https://botserver/sendmessages

Sample Payload 1:

{   "channelid": 

"19%3A2a53a6b4bec04ff89ee9a12a46577dc6%40thread.tacv2" "message":

"Hi Team, {{newhire_firstname}} joining our team on

{{newhire_startdt}}" }

Response:


Once successful you will get the below response

{     

"id": "1590470249921"

}

Webhook setting

While configuring the web-hook, please select authentication as Microsoft Team and remove any additional header/key row.

References

Office 365 login

https://admin.microsoft.com/Adminportal/Home?source=applauncher#/homepage

Go to admin center to view all different portal

Microsoft team portal login

https://admin.teams.microsoft.com/dashboard

Need to enable upload custom apps and change upload policies

To obtain personal chat's unique conversation id, we need to pass on member id, Is there any direct REST API available to obtain member id?

https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/send-proactive-messages?tabs=javascript

Get Conversation Members API

https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0#send-to-conversation

Get member detail

https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/get-teams-context?tabs=json#fetching-the-roster-or-user-profile

Did this answer your question?