//Initialize the MS Teams library
microsoftTeams.initialize();
microsoftTeams.settings.getSettings(function (settings) {
$("#webhookUrl").val(settings.webhookUrl);
});
microsoftTeams.settings.registerOnSaveHandler(function (saveEvent) {
url = "https://" + window.location.hostname;
microsoftTeams.getContext(function (context) {
entity = `connector-${context.teamId}-${context.channelId}`;
});
You may refer to more functions in Teams Javascript SDK here.
You may connect your Teams channel with any service outside the world. The service may be Twitter, Trello, Github, Azure or any custom applications.
OpenUri: It allows users to navigate from MS Teams to the user’s portal. This will increase user engagement and productivity towards the application.
HttpPOST: Users may POST content to any service from MS Teams to custom service. The target service needs to authenticate the POST call requested from MS Teams. Microsoft adds the bearer token in all the HTTP requests. The token is a JSON web token(JWT) signed by Microsoft and it includes Tenant and user’s identification.
ActionCard: This can be used with HttpPOST. You may wish to take some input from the user along with action buttons. Generally, this can be used when you take a small survey, adding comments or take users’ choice of actions. Users can post their views along with actions in Teams.
InvokeAddInCommand: This action results in Microsoft outlook. Outlook opens the requests from Teams and makes the initialization context specified by the action available to the add-in.
In conclusion, MS Teams connector is an easy option to get your organization data to Teams and perform the bidirectional action between Teams and your service.
Nadir Riyani is a Technical Lead at Crest Data Systems, with 12+ years of experience in Software development. He has successfully delivered software products for Financial, Inventory, Sales, Manufacturing, and Transportation domains. At Crest Data Systems, Nadir has worked with several cloud providers and frameworks like AWS, Azure, and Splunk. Prior to Crest, Nadir has worked as a Team Lead for MSBC Group.