Skip to content
Branch: master
Find file History
johnataylor and sgellock 4.5.1 Corebot updates (#1570)
* improved handling of LUIS response

* Remove CreateReply (use MessageFactory)

* Refactored code to make it easier to test.
Updated messages and prompts so they work with speech.

* Renamed file to match class name

* Updated comments.

* Updated MessageFactory.Text creation to use new sequence and made it consistent across the board.

* Gabog/corebot updates with unit tests (#1590)

* Added UnitTests for CoreBot

* Added readme file

* Testing images in readme

* WIP updated Readme.

* Updated readme

* Added Analyzing Test Output section to redame

* Added link to xunit docs

* Added Theory tests with InlineData section

* Fixed some typos

* allow latest C# features

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* readme updates

* Fixes 1558 - corebot should work in gov cloud (#1602)

Update AdapterWithErrorHandler to use IConfiguration
Update csproj to use 4.4.5 bot fx
Remove ICredentialProvider from startup.cs

* Update CoreBot .NET Template

update AdapterWithErrorHandler to use new constructor
update cs proj to 4.4.5 version of bot fx
remove ICredentialProvider from statup.cs
remove ConfigurationCredentialProvider.cs

* Remove ConfigurationCredentialProvider and DialogExtensions from CoreBot

* Removed unused using directive

* Updated CoreBot.Tests to use the latest Testing package and fixed issues caused by breaking changes.

* Gabog/corebot updates/js updates with tests (#1628)

* Initial readme cloned from dotnet

* Readme updates

* Readme updates.
Moved images to a new folder.

* Updated corebot JS to the new version with unit tests.
Updated comments and some names in the C# version for parity with JS.

* Removed images (they've been moved to
Shortened the readme and added link to

* Fixed broken link.

* Updated JS readme.
Fixed some typos.

* Fixed links

* Update

Added channel ID

* Update

Removed await from getNextReply

* updated middleware array to be of type IMiddleware

* re-remove logger, various cleanup

* fix remaining eslint errors in core-bot

* remove at-mention code, cleanup config for LUIS

* remove extra dep, use getter in flightBookingRecognizer

* cleanup mainDialog and its tests in JS core-bot

* update dependencies, fix npm audit report

* Updated links to doc (temporarily until we get the ones)

* Updated links to packages and docs.

* Updated link test

* Cleanup corebot and corebot-test

* Updated project to reference Microsoft.AspNetCore.App instead of individual apsnet core packages to avoid conflicts when changing TargetFramework.

* Update CoreBot .NET Template

- restructure folder to enable CoreBot and CoreBot.Tests
- update CoreBot to use latest structure
- update to use 4.5 of Bot Framework
- update to document how to use —include-tests command line option and the fact that generating CoreBot.Tests is a new capability of the template
- minor bug fixes
- bump version numbers to 4.5.0

* Update link to test docs

replace placeholder link to use correct link

* .NET Template for CoreBot updates

update template code to match final version

* Updated LUIS setup wording

* .NET CoreBot Template default.html cleanup

- removed old commented out markup

* Corebot ts updates (#1648)

* V3 state bot, and v4 state bot that uses Bot.Builder.Azure.V3ToV4 for UserState (#1573)

* add v3 state bot, and v4 state bot that uses Bot.Builder.Azure.V3ToV4 to connect to v3 stored UserState

* add/update migration readmes.
Add AzureSql-CreateTable.sql
 remove secret from V3StateBot default.htm

* [Expression_Document]Add doc for built-in functions (#1592)

* Update the usage of TemplateEngine

Update the usage of TemplateEngine. Currently, template engine will use new TemplateEngine().AddFiles() to load lg files

* update usage doc of some date time functions

* add some description for expression functions

* Add some function description and examples

* Add description & examples for built-in functions

* Add examples and descriptions

* add some conversion functions

* fix some format and add some uri conversion func

* Add missiong docs for built-in functions

* delete fromFile in LG readme doc

* Add parameters.json for ARM templates (#1627)

* add initial ARM template parameters.json

* cleanup ARM template parameters.json

* add parameters.json files to all samples

* add ARM parameter.json files to generators

* update ts corebot sample, port tests

* fix tslint errors, add tslint rules

* apply init PR feedback to TS core-bot

* apply @gabog's feedback to TS core-bot

* remove redundant state save from TS core-bot

* Updated MainDialog on all 3 languages to use the initialdialogID in the replace call and avoid creating infinite nested parents.

* Updated projects to point to 4.5.1
Updated tests to pass.

* Updated generators tests to pass with 4.5.1

* corebot yeaoman updates

- corebot updates
- prompting for test project, but to be implemented

* pickup C# Core Bot feedback, update dependencies in dotnetcore

* bug fixes, update to latest lint rules

- use latest lint rules in prep for moving off of tslint
- fix lint rule violations
- fix broken links with new working link
Latest commit 4b44df1 Jul 19, 2019

Authentication Bot Utilizing MS Graph

Bot Framework v4 bot authentication using Microsoft Graph sample

This bot has been created using Bot Framework, is shows how to uss the bot authentication capabilities of Azure Bot Service. In this sample we are assuming the OAuth 2 provider is Azure Active Directory v2 (AADv2) and are utilizing the Microsoft Graph API to retrieve data about the user. Check here for information about getting an AADv2 application setup for use in Azure Bot Service. The scopes used in this sample are the following:

  • email
  • Mail.Read
  • Mail.Send.Shared
  • openid
  • profile
  • User.Read
  • User.ReadBasic.All

NOTE: Microsoft Teams currently differs slightly in the way auth is integrated with the bot. Refer to sample 46.teams-auth.


  • .NET Core SDK version 2.1

    # determine dotnet version
    dotnet --version
  • Update appsettings.json with required configuration settings

    • MicrosoftAppId
    • MicrosoftAppPassword
    • ConnectionName

To try this sample

  • Clone the repository

    git clone
  • In a terminal, navigate to samples/csharp_dotnetcore/

  • Run the bot from a terminal or from Visual Studio, choose option A or B.

    A) From a terminal

    # run the bot
    dotnet run

    B) Or from Visual Studio

    • Launch Visual Studio
    • File -> Open -> Project/Solution
    • Navigate to samples/csharp_dotnetcore/ folder
    • Select BotAuthenticationMSGraph.csproj file
    • Press F5 to run the project

Testing the bot using Bot Framework Emulator

Microsoft Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.

  • Install the Bot Framework emulator from here
  • In Bot Framework Emulator Settings, enable Use a sign-in verification code for OAuthCards to receive the magic code

Connect to the bot using Bot Framework Emulator

  • Launch Bot Framework Emulator
  • File -> Open Bot
  • Enter a Bot URL of http://localhost:3978/api/messages


This sample uses the bot authentication capabilities of Azure Bot Service, providing features to make it easier to develop a bot that authenticates users to various identity providers such as Azure AD (Azure Active Directory), GitHub, Uber, and so on. These updates also take steps towards an improved user experience by eliminating the magic code verification for some clients and channels. It is important to note that the user's token does not need to be stored in the bot. When the bot needs to use or verify the user has a valid token at any point the OAuth prompt may be sent. If the token is not valid they will be prompted to login.

Microsoft Graph API

This sample demonstrates using Azure Active Directory v2 as the OAuth2 provider and utilizes the Microsoft Graph API. Microsoft Graph is a Microsoft developer platform that connects multiple services and devices. Initially released in 2015, the Microsoft Graph builds on Office 365 APIs and allows developers to integrate their services with Microsoft products including Windows, Office 365, and Azure.

Deploy the bot to Azure

To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.

Further reading

You can’t perform that action at this time.