Coder Social home page Coder Social logo

bot-sso's Introduction

Getting Started with Bot SSO

A bot, chatbot, or conversational bot is an app that responds to simple commands sent in chat and replies in meaningful ways. Examples of bots in everyday use include: bots that notify about build failures, bots that provide information about the weather or bus schedules, or provide travel information. A bot interaction can be a quick question and answer, or it can be a complex conversation. Being a cloud application, a bot can provide valuable and secure access to cloud services and corporate resources.

This is a sample chatbot application demonstrating Single Sign-on using botbuilder and Teams Framework that can respond to a show message.

Bot SSO Overview

This sample illustrates

  • Use Teams Toolkit to create a Teams bot app.
  • Use Microsoft Graph to get User info and picture in Teams app.
  • Use TeamsFx SDK to implementing SSO for Teams bot.

Prerequisite to use this sample

Minimal path to awesome

Run the app locally

  • From VS Code:
    1. hit F5 to start debugging. Alternatively open the Run and Debug Activity Panel and select Debug (Edge) or Debug (Chrome).
  • From TeamsFx CLI:
    1. Install ngrok.
    2. Sign up an ngrok account in https://dashboard.ngrok.com/signup. Copy your personal ngrok authtoken from https://dashboard.ngrok.com/get-started/your-authtoken.
    3. Start your local tunnel service by running the command ngrok http 3978 --authtoken=<your-personal-ngrok-authtoken>.
    4. In the env/.env.local file, fill in the values for BOT_DOMAIN and BOT_ENDPOINT with your ngrok URL.
      BOT_DOMAIN=sample-id.ngrok.io
      BOT_ENDPOINT=https://sample-id.ngrok.io
      
    5. Run command: teamsfx provision --env local .
    6. Run command: teamsfx deploy --env local .
    7. Run command: teamsfx preview --env local .

Deploy the app to Azure

  • From VS Code:
    1. Sign into Azure by clicking the Sign in to Azure under the ACCOUNTS section from sidebar.
    2. Click Provision from LIFECYCLE section or open the command palette and select: Teams: Provision.
    3. Click Deploy or open the command palette and select: Teams: Deploy.
  • From TeamsFx CLI:
    1. Run command: teamsfx account login azure.
    2. Run command: teamsfx provision --env dev.
    3. Run command: teamsfx deploy --env dev.

Preview the app in Teams

  • From VS Code:
    1. Open the Run and Debug Activity Panel. Select Launch Remote (Edge) or Launch Remote (Chrome) from the launch configuration drop-down.
  • From TeamsFx CLI:
    1. Run command: teamsfx preview --env dev.

Version History

Date Author Comments
Apr 19, 2022 IvanJobs update to support Teams Toolkit v4.0.0
Dec 7, 2022 yukun-dong update to support Teams Toolkit v5.0.0

Feedback

We really appreciate your feedback! If you encounter any issue or error, please report issues to us following the Supporting Guide. Meanwhile you can make recording of your journey with our product, they really make the product better. Thank you!

bot-sso's People

Contributors

dannygar avatar

Watchers

 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.