Skip to content

Latest commit

 

History

History

nodeJs

page_type description products languages extensions urlFragment
sample
This sample illustrates how you can use Resource Specific Consent (RSC) to call Graph APIs.
office-teams
office
office-365
nodejs
contentType createdDate
samples
07-07-2021 13:38:26
officedev-microsoft-teams-samples-graph-rsc-nodeJs

RSC with Graph API

This sample illustrates you can use Resource Specific Consent to call Graph API.

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-rsc/nodejs

  3. Install modules

    npm install
  4. Run ngrok - point to port 3978

    ngrok http -host-header=rewrite 3978
  5. Update the .env configuration for the bot to use the Microsoft App Id and App Password from the Bot Framework registration. (Note the App Password is referred to as the "client secret" in the azure portal and you can always create a new client secret anytime.)

  6. Run your bot at the command line:

    npm start
  7. This step is specific to Teams.

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