This sample app demonstarte the installation lifecycle for Teams Apps which includes create, update delete Apps
-
Clone the repository
git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
-
In a terminal, navigate to
samples/graph-app-installation-lifecycle/nodejs
-
Install modules
npm install
-
Run ngrok - point to port 3978
ngrok http -host-header=rewrite 3978
-
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
-
Update the
.env
configuration with theClientId
andClientSecret
-
Run your bot at the command line:
npm start
-
This step is specific to Teams.
- Edit the
manifest.json
contained in theManifest
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 themanifest.json
)and ngrok url everywhere you see the place holder string<<base-URL>>
- Zip up the contents of the
Manifest
folder to create amanifest.zip
- Upload the
manifest.zip
to Teams (in the Apps view click "Upload a custom app")
- Edit the