Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
page_type description products languages extensions contentType createdDate
sample
This sample illustrates how you can use Teams App Installation Life Cycle by calling Microsoft Graph APIs. .
office-teams
office
office-365
nodejs
samples
06-10-2021 01:48:56

App Installation

This sample app demonstarte the installation lifecycle for Teams Apps which includes create, update delete Apps

Prerequisites

To try this sample

  1. Clone the repository

    git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
  2. In a terminal, navigate to samples/graph-app-installation-lifecycle/nodejs

  3. Install modules

    npm install
  4. Run ngrok - point to port 3978

    ngrok http -host-header=rewrite 3978
  5. Register your app with Microsoft identity platform via the Azure AD portal

    • Your app must be registered in the Azure AD portal to integrate with the Microsoft identity platform and call Microsoft Graph APIs. See Register an application with the Microsoft identity platform.
    • You need to add following permissions mentioned in the below screenshots to call respective Graph API
  6. Update the .env configuration with the ClientId and ClientSecret

  7. Run your bot at the command line:

    npm start
  8. This step is specific to Teams.

    • Edit the manifest.json contained in the Manifest folder to replace your Microsoft App Id (that was created when you registered your bot earlier) everywhere you see the place holder string <<Manifest-id>> (depending on the scenario the Microsoft App Id may occur multiple times in the manifest.json)and ngrok url everywhere you see the place holder string <<base-URL>>
    • Zip up the contents of the Manifest folder to create a manifest.zip
    • Upload the manifest.zip to Teams (in the Apps view click "Upload a custom app")