-
Notifications
You must be signed in to change notification settings - Fork 888
Adding membership change notification nodejs sample #1718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AjayJ12-MSFT
merged 13 commits into
main
from
v-ajayjadhav/membershipChangeNotificationNodejs
Oct 29, 2025
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
967193a
Adding membership change notification nodejs sample
AjayJ12-MSFT 870c6c8
Updating the API with query string
AjayJ12-MSFT 6f3c4f0
Updating readme and updating the code with necessary changes
AjayJ12-MSFT 02d735a
Fixing broken image
AjayJ12-MSFT f183c28
Updating readme
AjayJ12-MSFT a2daf7f
Merge branch 'main' into v-ajayjadhav/membershipChangeNotificationNodejs
AjayJ12-MSFT d2d4f76
Updating Gif and assets.json
AjayJ12-MSFT 710af45
Adding the sharedWithTeam API to the sample
AjayJ12-MSFT c75a75e
Updating sample
AjayJ12-MSFT 14656eb
Updating membership display
AjayJ12-MSFT 9b0367e
Update channel-notification.jsx
AjayJ12-MSFT a078abb
fixing PR comments.
AjayJ12-MSFT 9a4d87f
Update build pipeline
AjayJ12-MSFT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
.github/workflows/graph-membership-change-notification-nodejs.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
81
samples/graph-membership-change-notification/nodejs/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/ |
5 changes: 5 additions & 0 deletions
5
samples/graph-membership-change-notification/nodejs/.vscode/extensions.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "recommendations": [ | ||
| "TeamsDevApp.ms-teams-vscode-extension" | ||
| ] | ||
| } |
181 changes: 181 additions & 0 deletions
181
samples/graph-membership-change-notification/nodejs/.vscode/launch.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| ] | ||
| } |
11 changes: 11 additions & 0 deletions
11
samples/graph-membership-change-notification/nodejs/.vscode/settings.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "debug.onTaskErrors": "abort", | ||
| "json.schemas": [ | ||
| { | ||
| "fileMatch": [ | ||
| "/aad.*.json" | ||
| ], | ||
| "schema": {} | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.