Giter Site home page Giter Site logo

brijrajsingh / microsoft-graph-bot-quickstart-luis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hongbo-miao/microsoft-graph-bot-quickstart-luis

0.0 1.0 0.0 2.47 MB

This repository holds a quickstart template for building a bot that connects to the Microsoft Graph and uses LUIS.

License: MIT License

C# 95.19% ASP 0.97% HTML 3.84%

microsoft-graph-bot-quickstart-luis's Introduction

Microsoft Graph Bot Quickstart w/ LUIS

This repository holds a quickstart template for building a bot that connects to the Microsoft Graph and leverages LUIS for intents. A more simple quickstart for building bots with the Microsoft Graph without LUIS can be found HERE. Please follow the steps below to use this project.

This is not designed for production. It exists primarily to get you started quickly with learning and prototyping bots that connect to the Microsoft Graph

Please keep the above in mind before posting issues and PRs on this repo.

Working with the Microsoft Graph in a Bot

This project uses the BotAuth package(s) for handling authentication against Azure AD. BotAuth uses a magic number to secure the authentication flow, even when the bot is part of a group conversation. All of the logic for this Quickstart solution can be found in the Dialogs/RootDialog.cs file. Ultimately, you forward dialog to the AuthDialog, which handles the authentication flow and returns an access token for calling the Microsoft Graph.

Steps for using the Quickstart

  1. You will start by cloning the Quickstart template into a new project folder:
git clone https://github.com/richdizz/microsoft-graph-bot-quickstart-luis.git MyProjectName
  1. Next, discard the git references:
rm -rf .git  # OS/X (bash)
rd .git /S/Q # windows
  1. Open the project in Visual Studio, allow the NuGet packages to restore, and run the project.

  2. Launch the Bot Framework Emulator (available HERE).

  3. Enter the messaging endpoint for the bot project (likely http://localhost:3980/api/messages but could be a different port) and the click the "Connect" button (leave the Microsoft App ID and Microsoft App Password blank as these are for published bots).

  4. Type anything to the bot and follow the prompts.

Animated gif of Quickstart project run in the Bot Emulator

Going further

The first step in going further would be to register your own appliation at https://apps.dev.office.com. This will allow you to play with different scopes and Microsoft Graph endpoints. You should also create your own LUIS model at LUIS. The LUIS model referenced in the code has been exported and added to the solution for your reference - MsftGraphBotQuickStartLUIS.json. It is also recommended you experiment with the bot in real Bot Framework channels (vs the emulator). The Bot Framework supports a number of channels, including Facebook Messenger, Microsoft Teams, Skype, and much more. You can register a bot at https://bots.botframework.com.

An easy addition to the solution would be to query thumbnails for the files that come back. You can read more about OneDrive's thumbnail API in the Microsoft Graph HERE.

microsoft-graph-bot-quickstart-luis's People

Contributors

richdizz avatar

Watchers

Brijraj Singh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.