Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/graph-membership-change-notification-nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Deploy - Nodejs Membership Change Notification

on:
push:
#Change the branch name to <<main>>
#Change the path to the folder where your code resides. Any change here will start the activity.
branches:
- main
paths:
- 'samples/graph-membership-change-notification/**'
workflow_dispatch:

env:
#AZURE_WEBAPP_PATH is the project path
#Web app name is your azure app service name.
AZURE_WEBAPP_PATH: 'samples/graph-membership-change-notification/nodejs'
AZURE_WEBAPP_NAME: 'graph-membership-change-notification'

jobs:
build:
runs-on: windows-latest
defaults:
run:
working-directory: ${{ env.AZURE_WEBAPP_PATH }}

steps:
- uses: actions/checkout@v2

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: '18.x'

- name: npm install, build, and test
run: |
npm install
npm run build --if-present

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: node-app
path: ${{ env.AZURE_WEBAPP_PATH }}/

deploy:
runs-on: windows-latest
needs: build
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: node-app

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_Tab_Ui_Templates }}
package: .
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ The [Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDev
| 13 | Resource Specific Consent (RSC) | This sample illustrates how you can use [Resource Specific Consent (RSC)](https://docs.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent) to call Graph APIs. | Advanced | [View][graph#rsc#cs] | [View][graph#rsc#js] ![toolkit-icon](assets/toolkit-icon.png) | [View](samples/graph-rsc/csharp/demo-manifest/graph-rsc.zip) |
| 14 | Graph API Teams App Catalog Life Cycle | This sample demonstrates how to manage the lifecycle of Teams apps in the app catalog using Microsoft Graph APIs through a bot. | Advanced | [View][graph#appctaloglifecycle#cs] | [View][graph#appcataloglifecycle#js] ![toolkit-icon](assets/toolkit-icon.png) | [View](samples/graph-appcatalog-lifecycle/csharp/demo-manifest/graph-appcatalog-lifecycle.zip) |
| 15 | Graph File Fetch| This sample demonstrates how to fetch shared files in teams group chat and team channel using graph API. | Advanced | [View][graph-file-fetch#cs] | [View][graph-file-fetch#js] | [View](samples/graph-file-fetch/csharp/demo-manifest/graph-file-fetch.zip) |
| 16 | Membership Change Notification | This sample application demonstrates how to send notifications for shared channel events in Microsoft Teams, such as users being added, removed, or having their membership updated, using Node.js and the Microsoft Graph API. | Advanced | [View][graph#membershipchangenotification#cs] | [View][graph#graph#appcataloglifecycle#js#js] ![toolkit-icon](assets/toolkit-icon.png) | |


## [Calls and online meetings bots](https://docs.microsoft.com/microsoftteams/platform/bots/calls-and-meetings/calls-meetings-bots-overview)
Expand Down Expand Up @@ -463,6 +464,8 @@ The [Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDev
[graph#chatlifecycle#js]:samples/graph-chat-lifecycle/nodejs
[graph#appctaloglifecycle#cs]:samples/graph-appcatalog-lifecycle/csharp
[graph#appcataloglifecycle#js]:samples/graph-appcatalog-lifecycle/nodejs
[graph#membershipchangenotification#cs]:samples/graph-membership-change-notification/csharp
[graph#membershipchangenotification#js]:samples/graph-membership-change-notification/nodejs
[graph#graphproactiveinstallation#cs]:samples/graph-proactive-installation/csharp
[graph#graphproactiveinstallation#js]:samples/graph-proactive-installation/nodejs
[graph-activity-feed#cs]:samples/graph-activity-feed/csharp
Expand Down
7 changes: 7 additions & 0 deletions samples/graph-membership-change-notification/nodejs/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MicrosoftAppId=
MicrosoftAppPassword=
MicrosoftAppTenantId=
notificationUrl=
BaseUrl=
Base64EncodedCertificate=
PRIVATE_KEY_PATH=
81 changes: 81 additions & 0 deletions samples/graph-membership-change-notification/nodejs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.zip

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# Distributables
dist/
manifest/
build/

#############

# TeamsFx files
.localConfigs
appManifest/build
/build

# dependencies
node_modules/

# misc
.deployment
.DS_Store

# build
lib/
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"TeamsDevApp.ms-teams-vscode-extension"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Frontend in Teams (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in Teams (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in Outlook (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in Outlook (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in the Microsoft 365 app (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in the Microsoft 365 app (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Local Service",
"type": "node",
"request": "attach",
"port": 9239,
"restart": true,
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
}
],
"compounds": [
{
"name": "Debug in Teams (Edge)",
"configurations": [
"Attach to Frontend in Teams (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 1: Teams",
"order": 1
},
"stopAll": true
},
{
"name": "Debug in Teams (Chrome)",
"configurations": [
"Attach to Frontend in Teams (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 1: Teams",
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Outlook (Edge)",
"configurations": [
"Attach to Frontend in Outlook (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 2: Outlook",
"order": 1
},
"stopAll": true
},
{
"name": "Debug in Outlook (Chrome)",
"configurations": [
"Attach to Frontend in Outlook (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 2: Outlook",
"order": 2
},
"stopAll": true
},
{
"name": "Debug in the Microsoft 365 app (Edge)",
"configurations": [
"Attach to Frontend in the Microsoft 365 app (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 3: the Microsoft 365 app",
"order": 1
},
"stopAll": true
},
{
"name": "Debug in the Microsoft 365 app (Chrome)",
"configurations": [
"Attach to Frontend in the Microsoft 365 app (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 3: the Microsoft 365 app",
"order": 2
},
"stopAll": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"debug.onTaskErrors": "abort",
"json.schemas": [
{
"fileMatch": [
"/aad.*.json"
],
"schema": {}
}
]
}
Loading