Sibeesh Passion

Top Menu

  • Home
  • Search
  • About
  • Privacy Policy

Main Menu

  • Articles
    • Azure
    • .NET
    • IoT
    • JavaScript
    • Career Advice
    • Interview
    • Angular
    • Node JS
    • JQuery
    • Knockout JS
    • Jasmine Framework
    • SQL
    • MongoDB
    • MySQL
    • WordPress
  • Contributions
    • Medium
    • GitHub
    • Stack Overflow
    • Unsplash
    • ASP.NET Forum
    • C# Corner
    • Code Project
    • DZone
    • MSDN
  • Social Media
    • LinkedIn
    • Facebook
    • Instagram
    • Twitter
  • YouTube
    • Sibeesh Venu
    • Sibeesh Passion
  • Awards
  • Home
  • Search
  • About
  • Privacy Policy

logo

Sibeesh Passion

  • Articles
    • Azure
    • .NET
    • IoT
    • JavaScript
    • Career Advice
    • Interview
    • Angular
    • Node JS
    • JQuery
    • Knockout JS
    • Jasmine Framework
    • SQL
    • MongoDB
    • MySQL
    • WordPress
  • Contributions
    • Medium
    • GitHub
    • Stack Overflow
    • Unsplash
    • ASP.NET Forum
    • C# Corner
    • Code Project
    • DZone
    • MSDN
  • Social Media
    • LinkedIn
    • Facebook
    • Instagram
    • Twitter
  • YouTube
    • Sibeesh Venu
    • Sibeesh Passion
  • Awards
  • Linux Azure Function Isolated Dot Net 9 YAML Template Deployment

  • Build, Deploy, Configure CI &CD Your Static Website in 5 mins

  • Post Messages to Microsoft Teams Using Python

  • Get Azure Blob Storage Blob Metadata Using PowerShell

  • Deploy .net 6 App to Azure from Azure DevOps using Pipelines

Azure
Home›Azure›Create Custom Web Apps for Microsoft Teams Using Azure Function, Node Js

Create Custom Web Apps for Microsoft Teams Using Azure Function, Node Js

By SibeeshVenu
June 23, 2020
0
1
Share:

[toc]

Introduction

The popularity of Microsoft Teams is getting increased day by day, thus the new requirements. Do you know that we can always develop our own web apps and integrate the same to our Microsoft Teams? That is exactly what we are going to do in this blog. Let’s start then.

Background

My plan was to create a web application in Vuejs with Nodejs, and convert the same to Microsoft Team’s web application so that my Team members can use it. There is a generator that helps you create a basic application with some default functionality, but that will support only Angular and react for now (the time that I write this article).

yo office generator

You should also keep in mind that you will have to set up your machine before you start working with “yo generator”. The complete setup can be found here, I am just mentioning it here, even though it is not relevant to this article. So here I will create a Teams App using Javascript SDK and I will connect the same with my Vuejs application later, I will write about that in my next blog.

What we are going to do

We will be doing preceding things in this post,

  1. Create an Azure function with Node Js HttpTrigger
  2. Customize the Azure function to use static HTML file we upload
  3. Generate the Index.html file, config.html file as per Microsoft Teams Web App standard
  4. Generate the manifest file
  5. Install our new Web App in Microsoft Team

Are you still with me and above mentioned points sounds interesting for you, then let’s develop something.

Create Static Website Using JavaScript SDK

Here we are going to use Microsoft Teams JavaScript client SDK to develop our application. And with the help of these SDK, we can develop a wide variety of applications, some of them are listed below.

  • Tabs
  • Bots
  • Messaging Extensions
  • Task Modules
  • Webhooks and Office 365 connector

And within the Tab type, we can develop a static Tab application (The tabs that are shown in the left side of the Teams application, here the context will be same for all the users) and a configurable tab application (The tab we can add to any channel, or groups and can be configurable with logged-in users context).

Here we are going to develop a small application that just shows the logged in user email id on our home page. Just remember that this is just a starting blog and the motive of this blog is to give you a walkthrough on how you can develop and install custom apps in Microsoft Teams. To develop the application for Microsoft Teams, we need the below pages.

  1. Content Page(index.html), this is the page that displayed in the Tab app
  2. Configuration Page(config.html), that used to set the content page

Now open any of your favorite code editors and create two files index.html and config.html and then replace the codes.

Here we are just setting our Tab’s name and then we are calling “microsoftTeams.settings.setValidityState(true)”, at then end the Save button will be enabled for you after the validation. Please remember that you should call “microsoftTeams.initialize()” before you perform any of these tasks.

Here on our content page, we are just getting the logged-in user name and show it to a div element. As simple as that.

Static Website Using Azure Fucntion

The capabilities of an Azure Function is limitless, it is up to you for what the Azure Function can be used. Now we are going to use the Azure function to host a static website.  I hope you have already used Azure Functions, if you have not, you can read some related articles here.

Now go to your Azure portal and search for Function App and create one. Remember to select the Nodejs as runtime stack. Once the function app is deployed successfully go to the Functions tab and click on the plus icon.

create azure function

From the template section, select the template HttpTrigger and then give a name for your function and set the authorization level to anonymous for now. You should see your function now and we can edit the code now. Go to your function and click on the button Code + Test.

Code+Test

Here is the place where you can edit your function code. Replace the codes with the below one.

Here we are loading our index.html file from the directory “myfiles” and add it as the context body so that the page will be displayed. Save the function and now we can create the folder “myfiles” and upload our pages there. To do that, go to your Azure Function and then click on Advanced Tools and click on the Goto link if it is asked. This will open a new browser tab with advanced tools. You can also visit this page by directly go to https://{yourfunctionname}.scm.azurewebsites.net/. Now click on the Debug console on the menu and then select CMD, go to the folder site -> wwwroot -> folder with the name of your function, this is where you will see the files function.json and index.js. Just click on the + (plus) icon on the top and create a new folder with the name “myfiles”. Go to the folder created and drag and drop your files there (index.html, config.html).

At this point, you should be able to see your index page, when you go to your function URL (https://yourfunctionname.azurewebsites.net/api/triggername?file=index.html), but if you go to the home page of your function by visiting https://yourfunctionname.azurewebsites.net, your index file is not loading right? We can override this by introducing a new proxy to our application.

Go to your Function App and click on the Proxies menu and then click on the +Add icon on the top. Fill the form given, your filled form should look like below.

Azure Function Proxy

Once the proxy is updated, go to your function home page and your index page should be loaded with the Team JavaScript SDK now, you can check this in the network tab in the browser console.

Create Manifest for Teams App

Now that our static website is ready, it is time to create a manifest for our team’s application. You can either create this manifest on your own, or you can use the tool called App Studio, here is the well-documented page which explains the features on this application. By using this tool we generate a manifest file by giving the static page files and other information. And at the end of the process, if all the validations are successful, then you will be given options to download the manifest file and install the app to any channel, or teams.

Here is the sample manifest file generated.

If you want to understand the complete structure of the manifest file, here is the link.

Install the Teams App in Teams

If you choose the option of downloading the manifest file, here is how you can install it. Click on the three-dot on the static tabs in Teams and then click on the More Apps link.

Add more apps

Now click on the “Upload a custom app” link at the bottom and then select your manifest zip file downloaded, it will contain the manifest.json file and other related files. Clicking on the “Add to a team” button on the next screen will start the process.

Add app to Team

In the next screen, select the channel you want to add this Tab App, and then click on the “Setup a tab” button. Once it is installed, you should see your email if you go to your Tab Application.

Output

Conclusion

I hope this post was useful and you have learned the below things.

  1. What are Microsoft Teams Web App?
  2. How to create a custom application for Microsoft Teams?
  3. How to load a static website using the Azure Function?
  4. What is Manifest and how to generate it using App Studio?
  5. How to install the Web Apps in Microsoft Teams?

About the Author

I am yet another developer who is passionate about writing and video creation. I have written close to 500 blogs on my blog. And I upload videos on my YouTube channels Njan Oru Malayali and Sibeesh Passion. Please feel free to follow me.

  • GitHub
  • medium
  • Twitter

Your turn. What do you think?

Thanks a lot for reading. Did I miss anything that you may think which is needed in this article? Could you find this post useful? Kindly do not forget to share your feedback. In the next post, we will see how we can connect this application to our Vuejs application.

Kindest Regards
Sibeesh Venu

TagsAzureAzure Functiondevelop custom apps for microsoft teamsjavascript sdk for teamsload static website using azure functionmicrosoft teams app with vuejsOffice 365yeoman generator vuejs
Previous Article

INTEGRATE 2020 Remote – A Walk-Through

Next Article

Create Microsoft Teams App Using Vuejs, Azure, ...

0
Shares
  • 0
  • +
  • 0
  • 0
  • 0

SibeeshVenu

I am Sibeesh Venu, an engineer by profession and writer by passion. Microsoft MVP, Author, Speaker, Content Creator, Youtuber, Programmer.

Related articles More from author

  • AzureIoT

    Azure Stream Analytics Job and Tools for Visual Studio

    December 13, 2018
    By SibeeshVenu
  • Text Translator Api Thumbnail
    AzureTranslator TextVideos

    Video: Azure Cognitive Services Text Translator API

    June 30, 2018
    By SibeeshVenu
  • Send Temperature, Humidity, Pressure from MXChip Output
    ArduinoAzureIoT

    MXChip Device with Pressure, Humidity, Temperature Info using Azure IoT Workbench

    January 4, 2019
    By SibeeshVenu
  • Azure

    Azure DevOps Service Connection with Multiple Azure Resource Group

    November 19, 2021
    By SibeeshVenu
  • AzureCognitive ServicesOffice 365SharePoint

    Azure Form Recognizer and Microsoft Flow to Search Scanned PDF Content in SharePoint Online

    March 5, 2020
    By SibeeshVenu
  • Azure

    TimerTrigger Azure Function to Upload to Azure Blob Daily

    July 17, 2019
    By SibeeshVenu
0

My book

Asp Net Core and Azure with Raspberry Pi Sibeesh Venu

YouTube

MICROSOFT MVP (2016-2022)

profile for Sibeesh Venu - Microsoft MVP

Recent Posts

  • Linux Azure Function Isolated Dot Net 9 YAML Template Deployment
  • Build, Deploy, Configure CI &CD Your Static Website in 5 mins
  • Easily move data from one COSMOS DB to another
  • .NET 8 New and Efficient Way to Check IP is in Given IP Range
  • Async Client IP safelist for Dot NET
  • Post Messages to Microsoft Teams Using Python
  • Get Azure Blob Storage Blob Metadata Using PowerShell
  • Deploy .net 6 App to Azure from Azure DevOps using Pipelines
  • Integrate Azure App Insights in 1 Minute to .Net6 Application
  • Azure DevOps Service Connection with Multiple Azure Resource Group

Tags

Achievements (35) Angular (14) Angular 5 (7) Angular JS (15) article (10) Article Of The Day (13) Asp.Net (14) Azure (65) Azure DevOps (10) Azure Function (10) Azure IoT (7) C# (17) c-sharp corner (13) Career Advice (11) chart (11) CSharp (7) CSS (7) CSS3 (6) HighChart (10) How To (9) HTML5 (10) HTML5 Chart (11) Interview (6) IoT (11) Javascript (10) JQuery (82) jquery functions (9) JQWidgets (15) JQX Grid (17) Json (7) Microsoft (8) MVC (20) MVP (9) MXChip (7) News (18) Office 365 (7) Products (10) SQL (20) SQL Server (15) Visual Studio (10) Visual Studio 2017 (7) VS2017 (7) Web API (12) Windows 10 (7) Wordpress (9)
  • .NET
  • Achievements
  • ADO.NET
  • Android
  • Angular
  • Arduino
  • Article Of The Day
  • ASP.NET
  • Asp.Net Core
  • Automobile
  • Awards
  • Azure
  • Azure CDN
  • azure devops
  • Blockchain
  • Blog
  • Browser
  • C-Sharp Corner
  • C#
  • Career Advice
  • Code Snippets
  • CodeProject
  • Cognitive Services
  • Cosmos DB
  • CSS
  • CSS3
  • Data Factory
  • Database
  • Docker
  • Drawings
  • Drill Down Chart
  • English
  • Excel Programming
  • Exporting
  • Facebook
  • Fun
  • Gadgets
  • GitHub
  • GoPro
  • High Map
  • HighChart
  • How to
  • HTML
  • HTML5
  • Ignite UI
  • IIS
  • Interview
  • IoT
  • JavaScript
  • JQuery
  • jQuery UI
  • JQWidgets
  • JQX Grid
  • Json
  • Knockout JS
  • Linux
  • Machine Learning
  • Malayalam
  • Malayalam Poems
  • MDX Query
  • Microsoft
  • Microsoft ADOMD
  • Microsoft MVP
  • Microsoft Office
  • Microsoft Technologies
  • Microsoft Windows
  • Microsoft Windows Server
  • Mobile
  • MongoDB
  • Monthly Winners
  • MVC
  • MVC Grid
  • MySQL
  • News
  • Node JS
  • npm
  • Number Conversions
  • October 2015
  • Office 365
  • Office Development
  • One Plus
  • Outlook
  • Page
  • PHP
  • Poems
  • PowerShell
  • Products
  • Q&A
  • Raspberry PI
  • React
  • SEO
  • SharePoint
  • Skype
  • Social Media
  • Software
  • Spire.Doc
  • Spire.PDF
  • Spire.XLS
  • SQL
  • SQL Server
  • SSAS
  • SSMS
  • Storage In HTML5
  • Stories
  • Third Party Software Apps
  • Tips
  • Tools
  • Translator Text
  • Uncategorized
  • Unit Testing
  • UWP
  • VB.Net
  • Videos
  • Virtual Machine
  • Visual Studio
  • Visual Studio 2017
  • Wamp Server
  • Web API
  • Web Platform Installer
  • Webinars
  • WebMatrix
  • Windows 10
  • Windows 7
  • Windows 8.1
  • Wordpress
  • Writing

ABOUT ME

I am Sibeesh Venu, an engineer by profession and writer by passion. Microsoft MVP, Author, Speaker, Content Creator, Youtuber, Programmer. If you would like to know more about me, you can read my story here.

Contact Me

  • info@sibeeshpassion.com

Pages

  • About
  • Search
  • Privacy Policy
  • About
  • Search
  • Privacy Policy
© Copyright Sibeesh Passion 2014-2025. All Rights Reserved.
Go to mobile version