Introduction

Azure AD is cloud-based identity and access management service, which helps employees to sign in and access company resources such as Microsoft 365, the Azure portal, and thousands of other SaaS applications. AZURE AD will provide different below feature
  1. Employee admin can enable Azure AD to require multi-factor authentication when accessing important organizational resources. you can use Azure AD to automate user provisioning between your existing Windows Server AD and your cloud apps, including Microsoft 365.
  2. Company has any enterprise application which provide related company information, timesheet app, employee inventory management app like that company can develop any application which allow only company users to access using Azure AD as a standards-based approach for adding single sign-on (SSO) and allowing it to work with a user's pre-existing credentials and no need add any other registration or login screen for your application.

Azure Active Directory(AD) with Custom domain

Create new tenant

  1. Login to personal / organization Azure portal https://portal.azure.com
  2. Create new Resource menu having “Azure Active Directory” as like below and click on Azure Active Directory





On Create a tenant page, click on “create active directory



On the create a tenant confirmation as information below
  1. Organization name - you can provide here as your organization name
  2. Initial domain name – provide here as your initial domain name
  3. Country/ Region – provide your county name.

Azure Active Directory(AD) with Custom domain

You will get new screen for review and confirmation tenant creation, after validation you will get initial domain as like this <your domain name>.onmicrosoft.com, example MSDEVJS.onmicrosoft.com


Azure Active Directory(AD) with Custom domain

Tenant creation is in progress and it will take a few minutes for get confirmation

Azure Active Directory(AD) with Custom domain

Your new tenant is created with the domain MSDEVJS.onmicrosoft.com.

Setup Custom Domain Name

You have successfully created new Azure AD tenant with default Microsoft sub domain, you can’t change Microsoft default sub domain, but you add you company custom domain, it will help you to create email and access Microsoft app with your domain name.

Step 1: Select option as a Custom Domain

Step 2: Click on Add custom domain in menu options


Azure Active Directory(AD) with Custom domain

In Custom domain name, enter your organization's new name, in this example, devenvexe.com. Select Add domain

Azure Active Directory(AD) with Custom domain

You must add universal domain extension like .in, .com, etc . devenvexe.com page appears showing your DNS information. Save this information. You need provide a TXT or MX record to configure DNS.

Azure Active Directory(AD) with Custom domain

After you add your custom domain name to Azure AD, you must return to your domain registrar provider and add the Azure AD DNS information from your copied TXT file. Creating this TXT record for your domain verifies ownership of your domain name.

Go back to your domain registrar and we have register domain in big rock and create a new TXT record for your domain based on your copied DNS information. Set the time to live (TTL) to 3600 seconds (60 minutes), and then add the record.

Azure Active Directory(AD) with Custom domain

After you add your custom domain name, make sure it is valid in Azure AD. The domain registrar to Azure AD can be taking a few days, depending on your domain registrar.

Summary


In this article, you learned about, Create a new tenant with Custom domain in Azure Active Directory. If you have any questions/ feedback/ issues, please write in the comment box.
Microsoft Azure is a cloud service that is constantly expanding to help your organization meet business challenges. You can build, manage deploy application using following Azure management options.

  • Azure Portal
  • Azure PowerShell and CLI
  • Azure Cloud Shell
  • Azure Mobile app
I have received many messages from users,” Want to learn Azure. But do not have an Azure subscription. Are there any tools? Simulators? etc” in this article, will elaborate and share about how you can learn Azure without paid Subscriptions.

You can activate free Azure benefits with following different options,

  • Azure Free Subscription
  • Microsoft Learn Azure Sandbox subscription.
  • Visual Studio subscription benefits (Formerly MSDN Subscriptions) 

How to learn Azure without paid subscription

Azure free Subscription

The Azure free account includes access to a number of Azure products that are free for 12 months, ₹13,300 credit to spend for the first 30 days of sign up and access to more than 25 products that are always free. 

You can learn from here more about Azure free account.

How to learn Azure without paid subscription

Microsoft Learn Azure Sandbox subscription Microsoft Learn is an online learning platform where you can gain practical knowledge about Azure by completing a bunch of courses and hands-on labs. Unlike the other learning platforms, it provides a free sandbox (dedicated subscription) that you can use to complete the courses

How to learn Azure without paid subscription

Visual Studio subscription benefits [MCT, MVP, FTE, MPN, NFR] Visual Studio subscriber can use Microsoft Azure at no extra charge. With your monthly Azure DevTest individual credit, Azure is your personal sandbox for dev and test. You can create virtual machines, cloud services, and other Azure resources. Credit amounts vary based on subscription level.

Microsoft no longer offers Visual Studio Professional Annual subscriptions and Visual Studio Enterprise Annual subscriptions in Cloud Subscriptions. There will be no change to existing customers experience and ability to renew, increase, decrease, or cancel their subscriptions.

If someone in your organization purchases subscriptions for your organization, contact your Visual Studio subscription administrator and request a subscription that provides the monthly credit that you need.

You can sign in in your visual studio benefits https://my.visualstudio.com/benefits. and see the Azure credit .You can find below the table for Azure credit eligibility.


  • Visual Studio Enterprise Standard  
    •  $150 monthly credit
  • Visual Studio Enterprise with GitHub Enterprise
    • $150 monthly credit
  • Visual Studio Enterprise monthly
    • NA
  • Visual Studio Professional Standard
    • $150 monthly credit
  • Visual Studio Professional with GitHub Enterprise
    • $150 monthly credit
  • Visual Studio Professional monthly
    • Not Available
  • Visual Studio Test Pro
    • 50 monthly credit
  • MSDN Platforms
    • 100 monthly credit
  • Visual Studio Enterprise – Not For ReSale[NFR]
    • $150 monthly credit
  • Visual Studio Enterprise – FTE
    • $150 monthly credit
  • Visual Studio Enterprise - Microsoft Partner Network
    • $150 monthly credit
  • Visual Studio Professional - Microsoft Partner Network
    • NA
  • Visual Studio Enterprise – Imagine (Standard)
    • NA
  • Visual Studio Enterprise – Imagine (Premium)
    • NA
  • Visual Studio Enterprise – BizSpark
    • $150 monthly credit
  • Visual Studio Enterprise – MCT Software & Services
    • 100 monthly credit
  • Visual Studio Enterprise – MCT Software & Services Developer
    • $150 monthly credit


Introduction
Microsoft Azure services are available in 53 regions around the world, with plans announced for 7 additional regions and 140+ available country. Select Azure region is more important to setup the cloud environment, this gives you the flexibility to bring applications closer to your users no matter where they are. It also provides better scalability, redundancy, and preserves data residency for your services.
Understanding about Azure Region, Geographies, Availability Zones and Region Pairs
Azure region
A region is a geographical area on the planet containing at least one, but potentially multiple datacenters that are nearby and networked together with a low-latency network. Azure intelligently assigns and controls the resources within each region to ensure workloads are appropriately balanced.

When you deploy a resource in Azure, you will often need to choose the region where you want your resource deployed. Region A set of datacenters deployed within a latency-defined perimeter and connected through a dedicated regional low-latency network.

Geographies in Azure
Azure divides the world into geographies that are defined by geopolitical boundaries or country borders. An Azure geography is a discrete market typically containing two or more regions that preserve data residency and compliance boundaries. 

This division has several benefits.
  • Geographies allow customers with specific data residency and compliance needs to keep their data and applications close.
  • Geographies ensure that data residency, sovereignty, compliance, and resiliency requirements are honored within geographical boundaries.
  • Geographies are fault-tolerant to withstand complete region failure through their connection to dedicated high-capacity networking infrastructure.
Availability Zones
Availability Zones are physically separate datacenters within an Azure region.Each Availability Zone is made up of one or more datacenters equipped with independent power, cooling, and networking. It is set up to be an isolation boundary. If one zone goes down, the other continues working. Availability Zones are connected through high-speed, private fiber-optic networks.


Azure Availability Zones

Region Pairs
Each Azure region is always paired with another region within the same geography (such as US, Europe, or Asia) at least 300 miles away. This approach allows for the replication of resources (such as virtual machine storage) across a geography that helps reduce the likelihood of interruptions due to events such as natural disasters, civil unrest, power outages, or physical network outages affecting both regions at once. If a region in a pair was affected by a natural disaster, for instance, services would automatically fail over to the other region in its region pair.Examples of region pairs in Azure are West US paired with East US, and SouthEast Asia paired with East Asia.

Azure Region Pairs
Power Virtual Agents is an easy to create, powerful bot with a no-code graphical interface. This means there isn't necessarily a need for data scientists or developers. It eliminates the gap between the subject matter experts and the development teams building the bots and it minimizes the IT effort required to deploy and maintain a custom conversational solution.

Building a FAQ bot using Power Virtual Agents

Every Business has their own website with a FAQ page, so you can use support questions from your existing web pages when you are creating a Power virtual agent bot, it will help you to create your support Bot within 5 min. You don’t want to copy and paste or manually re-creating same content. You can use AI agents assisted authority to automatically extract and create a relevant suggested topic from your FAQ pages. Microsoft made this sequence of work as a very simple easy steps, you can follow the steps below and create your own FAQ business chat Bot.

Building a FAQ bot using Power Virtual Agents

Setup Power Virtual Agents

Power Virtual Agents is a software-as-a-service (SaaS). It allows you to easily sign up, create your bot, and embed it into your website and integrate it to the different channels with just a few clicks. There’s no infrastructure to maintain or complex systems to deploy. Provide your work school account email id and click on Sign up /Sign in.

Building a FAQ bot using Power Virtual Agents

After click on Sign up/ sign in, you will get the following screen asking you to set your Bot name. Provide the relevant your business bot name.

Building a FAQ bot using Power Virtual Agents

You need to make sure there are three main steps need to do while doing import FAQ and add the topic to your bot application.
  • Import Suggested Topics from FAQ webpage
  • Add a topic.
  • Enable the topics

Import FAQ content

You can follow below steps for import topic messages from your FAQ web page

Step 1: Go to the Topics tab on the side navigation pane to open the topics page.

Step 2: on the Topic page, Select the Suggested Topics option on the top navigation pane/ suggested tab button.


Building a FAQ bot using Power Virtual Agents

Extract FAQ Topics

You are not imported any suggestions topic before, the list of suggested topics will be blank. A link to Get started or Learn more appears instead.

Building a FAQ bot using Power Virtual Agents


  • The following screen will appear after clicking on “Get Started”.
  • You can add multiple webpages at the same time, but Microsoft recommends that you include only a few at a time to keep the list of suggestions manageable.
  • You can make sure your webpage should be secure with SSL (https://)
  • If you added a page by mistake, you could select the Delete option before click on start.

Building a FAQ bot using Power Virtual Agents

When you're done adding pages, select Start. The process can take several minutes, depending on the complexity and number of webpages you added. The message "Getting your suggestions. This may take several minutes" appears at the top of the screen while the extraction is in progress.

Building a FAQ bot using Power Virtual Agents

After you've successfully extracted content, a number of suggestions will appear. Here, we have added MVP Summit FAQ URL, it’s extracted all the FAQ around 48 FAQ extracted and displaying in the suggested topic, you can now review these suggestions to see what you need add to your bot



After adding, you need to do two more steps to complete the process but if you try to test the application, after the suggested topic, you wont get those topic questions from the suggestion, Bot will reply the message “ Sorry I am not able to find a related topic“ .

Building a FAQ bot using Power Virtual Agents


Add a Topics

The import process has been completed, the topic suggestions appear on the Suggested tab. You can just add suggestions without reviewing but best approach was review them individually like below to decide which ones you want to include in your bot.

Step 1: Select the Name of Suggestions from Suggestion tab.

Step 2: You can also add or delete multiple topic suggestions at a time. If you select multiple rows from the suggestions tab, you'll see options to Add to topic or Delete.

Step 3: Let Start review the suggestion and every topic end of the conversion will display Survey topic questions like “ Did that answered the question” and the user can reply message “ Yes “ or “No” based on that conversation will continue, if you don’t want to display the conversation survey, you can remove anytime .

Step 4: You can edit Trigger phases, which users ask questions and edit answered messages, which bot will reply to the user.

Step 5: You can press on “Add to the Topic”, after your review suggestion topic

Step 6: Suggestion topic is not relevant or duplicate, you can press delete suggestion for remove the topic.

Building a FAQ bot using Power Virtual Agents

Once you click on Add to topic, you will get a confirmation message saying, your FAQ topic was added to existing topics.

Building a FAQ bot using Power Virtual Agents

Enable the topics

Suggested topics are added to the Existing tab with their status set to Off. This way, topics won't be prematurely added to your bot, so you can follow the below steps to enable the topic.

Step 1: Select Topics on the side navigation pane.

Step 2: Go to the Existing tab.

Step 3: For each topic you want to enable, turn on the toggle under Status.

Building a FAQ bot using Power Virtual Agents

Test Your Bot Application

You're now ready to test your bot. You will test your bot using the built-in Power virtual agent bot Emulator. Start giving the user Input, which you reviewed and enabled topic and refer below image, how to Trigger phase and message sync with user reply.


Summary

Building a FAQ bot using Power Virtual Agents

You have successfully done the import FAQ page in the power virtual agent. I hope you have enjoyed learning about Power virtual agent bot. you can also read my previous power virtual agent articles.
  1. Build a Microsoft Bot Application With Power Virtual Agents
  2. Customize the Bot Conversation Message With Power Virtual Agent
If you have any questions/feedback/issues, please write them in the comment box.
I am happy to share with you that I Just received the email confirmation saying I am becoming a Microsoft Certified Trainer (MCT). I am very happy to be part world biggest learning MCT community.

Suthahar Become a Microsoft Certified Trainer 2020

“Microsoft Certified Trainers (MCTs) are the premier technical and instructional experts in Microsoft technologies. Join this exclusive group of worldwide Microsoft technical training professionals and reap the benefits of MCT training certification and membership” I have received emails with MCT program benefits . If you are interested in becoming an MCT, please review the MCT Program Guide and the MCT Program Agreement to understand the terms of membership.

Suthahar Become a Microsoft Certified Trainer 2020

Power Virtual Agents are an easily created powerful bot and no-code graphical interface without the need for data scientists or developers. It eliminates the gap between the subject matter experts and the development teams building the bots and it minimizes the IT effort required to deploy and maintain a custom conversational solution. In my previous article you learned how to set up and quick overview about power virtual agents.

In this article you will learn more about how you can customize the bot conversation messages. User conversation message called as “Topic” in Power virtual agents. A topic has trigger phrases - these are phrases, keywords, or questions that a user is likely to type that is related to a specific issue - and conversation nodes - these are what you use to define how a bot should respond and what it should do and you can maintain up to 1000 topics in a Bot.


User and System Topic

Once again remind you, before reading this article, You can follow my previous article to learn more about setup and create the first Power Virtual agent Bot application.

When you have successfully create bot applications, you are able to see a number of topics will be created automatically and also you can see how the bot conversation works in practice by testing it in the Test bot pane. For example, a user might type “I want a Business Laptop" into your bot. The AI will recommend the Business Laptop and request you to confirm adding to the cart. Bot will suggest you provide “Yes” or “No”.



There are two topics the category system will generate. You can refer and learn the topic, how you need to implement it for your business use case.

User Topics Category you will find Four pre-populated User Topics that are titled as lessons. These lesson topics can be used to help understand, simple to complex ways of using nodes to create bot conversations.

System Topics is reusable topics like greeting, Say goodbye like that. These are pre-populated topics that you are likely to need during a bot conversation.

Create New Topic

You can create your own topic and maintain up to 1000 topics in a Bot.

Step 1: Go to the Topics tab on the side navigation pane to open the topics page.

Step 2: on the Topic page, Select the New Topic option on the top navigation pane.



Step 3: Provide a topic name, description, and one or more trigger phrases for the topic by clicking on Add button.


Go to Authoring Canvas

Click on Save Topic options on the right corner on the Topics page. Once click on Save topic, you will get the error and asking you to set Authoring Canvas



Power Virtual Agents open the topic in the authoring canvas and displays the topic's trigger phrases. The authoring canvas is where you define the conversation path between a customer and the bot, message Edit text box having styling feature, add and change the text font style and hyperlink


Build and Save Topic

Once you have done the changes, Click on Topic Checker. Topic checker will show you if there are any errors or warnings in the topic. If there's no error, Click on Save options.


Test Bot Application

You're now ready to test your bot. You will test your bot using the built-in Power virtual agent bot Emulator. You can provide user input, which we created a topic say “Can you suggest a Microsoft AI Learning Blog” and Bot will reply to the triggered message.


Summary


You have successfully created topics and run the application in the power virtual agent. I hope you have enjoyed learning about the Power virtual agent bot. If you have any questions/feedback/issues, please write them in the comment box.

Power Virtual Agents is an easily created powerful bot and no-code graphical interface without the need for data scientists or developers. It eliminates the gap between the subject matter experts and the development teams building the bots and it minimizes the IT effort required to deploy and maintain a custom conversational solution.

This article will demonstrate how easy it is to setup and build a Bot using Power Virtual Agents. The Bot will call a Power Automate Flow to return data from CDS and display it to the user. Power Virtual Agents is part of Microsoft AI and it allows Bots to be created using a Flow like designer without any code

Power Virtual Agents: Build a Microsoft Bot Application

Setup Power Virtual Agents Power Virtual Agents is a software-as-a-service (SaaS). It allows you to easily sign up, create your bot, and embed it into your website and integrate to the different channels with just a few clicks. There’s no infrastructure to maintain or complex systems to deploy.

1. Navigate to Power Virtual Agents and select Start Free and Sign in/ Signup using your work school account.

Power Virtual Agents: Build a Microsoft Bot Application

Create New Bot Application You can create a new bot by selecting the icon on the title bar to open the Bots pane and then selecting New bot, let you select the default environment for now.

Power Virtual Agents: Build a Microsoft Bot Application

Customize your Greeting The Power virtual agent dashboard with sequence steps is the author topic , publish bot and Monitor the performance. You can click on customize your greeting and will see the details below

Power Virtual Agents: Build a Microsoft Bot Application

Select the options “Customize your greeting” and you can see the default user trigger options and message template. Initial trigger phase will be, which user provides the trigger message and based on that bot will reply the message.

Power Virtual Agents: Build a Microsoft Bot Application

Test Your Bot Application You're now ready to test your bot. You will test your bot using the built-in Power virtual agent bot Emulator. Start give the user Input and also refer below image, how to Trigger phase and message sync with user replay


Power Virtual Agents: Build a Microsoft Bot ApplicationPower Virtual Agents: Build a Microsoft Bot Application
Summary 

You have successfully done the setup and built a bot application in the power virtual agent. I hope you have enjoyed learning about the Power virtual agent bot. If you have any questions/feedback/issues, please write them in the comment box.
The Azure AD is the identity provider, responsible for verifying the identity of users and applications and providing security tokens upon successful authentication of those users and applications.in this article I have explained about create Azure AD authentication and integrate into bot application using AuthBot library.



The Bot show very simple dialog with openUrl button and this button launches the web browser for validate user credential and AD will response the message with authentication code, you can copy same code and reply back to the bot, bot will validation and response the welcome message.

You can follow below given steps one by one and you will get to see an interesting demo at end of article.

Azure AD App registration:

I will show the steps given below for the azure application creation, user creation and permission configuration. While implementing bot application, We need Client ID, tenant, return URL, so here I will show how to get all the configuration information from the steps given below.

Step 1: 

Login to Microsoft Azure portal and choose Azure Active Directory from the sidebar.

Step 2:

 If you have not created AZURE Active directory, try to create new AD creation for tenant url or Select or add tenant url from Domain names sections

Building Bot Application with Azure AD Login Authentication using AuthBot

Step 3: 

Select Application Registration and Provide the details given below, name for the application , application type must be Web app/API, enter your application redirect URL and click on Create.

Building Bot Application with Azure AD Login Authentication using AuthBot

Step 4: 

We need to give the permission to access the application from Bot, so grand the permission. Select newly created Application > select Required Permission > Click Grand permission.

Step 5: 

create new user from users and groups sections (optional)

Step 6:

 Create client secret key from Application. Select Application > Select keys > add new / copy client secret key .

Building Bot Application with Azure AD Login Authentication using AuthBot

Step 4: 

You can copy tenant, client ID and Client Secret and you can follow below steps for create and implement AD authentication in Bot

Create New Bot Application:

Let's create a new bot application using Visual Studio 2017. Open Visual Studio > Select File > Create New Project (Ctrl + Shift +N) > Select Bot application.

Building Bot Application with Azure AD Login Authentication using AuthBot


The Bot application template gets created with all the components and all required NuGet references installed in the solutions.

Building Bot Application with Azure AD Login Authentication using AuthBot

Install AuthBot Nuget Package:

The AuthBot provide Azure Active Directory authentication library for implement Azure AD login in Bot .

Right click on Solution, select Manage NuGet Package for Solution > Search “ AuthBot” > select Project and install the package.

Building Bot Application with Azure AD Login Authentication using AuthBot

You can follow given below steps for integrate AD authentication 

Step 1:

 Select Web.config file and add Mode,resourceID,Endpointurl ,Tenant,clientID,clientSecret and redirect url appsettings property and replace Azure AD details as per below
<appSettings>
<add key="BotId" value="YourBotId" />
<add key="MicrosoftAppId" value="" />
<add key="MicrosoftAppPassword" value="" />
<add key="ActiveDirectory.Mode" value="v1" />
<add key="ActiveDirectory.ResourceId" value="https://graph.windows.net/" />
<add key="ActiveDirectory.EndpointUrl" value="https://login.microsoftonline.com" />
<add key="ActiveDirectory.Tenant" value="dxdemos.net" />
<add key="ActiveDirectory.ClientId" value="2d3b5788-05a5-486d-b2a4-2772a4511396" />
<add key="ActiveDirectory.ClientSecret" value="wU3oFBJ1gjWcB8Lo/fMaaCwg7ygg8Y9zBJlUq+0yBN0=" />
<add key="ActiveDirectory.RedirectUrl" value="http://localhost:3979/api/OAuthCallback" />
</appSettings>

Step 2: 

Select Global.asax.cs file and call all the bot app setting property and assign to AuthBot model class, like below
using System.Configuration;
using System.Web.Http;
namespace DevAuthBot
{
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
AuthBot.Models.AuthSettings.Mode = ConfigurationManager.AppSettings["ActiveDirectory.Mode"];
AuthBot.Models.AuthSettings.EndpointUrl = ConfigurationManager.AppSettings["ActiveDirectory.EndpointUrl"];
AuthBot.Models.AuthSettings.Tenant = ConfigurationManager.AppSettings["ActiveDirectory.Tenant"];
AuthBot.Models.AuthSettings.RedirectUrl = ConfigurationManager.AppSettings["ActiveDirectory.RedirectUrl"];
AuthBot.Models.AuthSettings.ClientId = ConfigurationManager.AppSettings["ActiveDirectory.ClientId"];
AuthBot.Models.AuthSettings.ClientSecret = ConfigurationManager.AppSettings["ActiveDirectory.ClientSecret"];
}
}
}

Step 3: 

You can create a new AzureADDialog class to show the default login and logout UI Design dialog. Rightclick on Project, select Add New Item, create a class that is marked with the [Serializable] attribute (so the dialog can be serialized to state), and implement the IDialog interface.
using AuthBot;
using AuthBot.Dialogs;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Connector;
using System;
using System.Configuration;
using System.Threading;
using System.Threading.Tasks;
namespace DevAuthBot.Dialogs
{
[Serializable]
public class AzureADDialog : IDialog<string>
{

Step 4 :

IDialog interface has only StartAsync() method. StartAsync() is called when the dialog becomes active. The method passes the IDialogContext object, used to manage the conversation.
public async Task StartAsync(IDialogContext context)
{

context.Wait(MessageReceivedAsync);

}

Step 5: 

Create a MessageReceivedAsync method and write the following code for the login and logout default dialog and create a ResumeAfterAuth for after the user login, bot will reply the user name and email id details.
///
/// Login and Logout
///
/// context">
/// item">
///
public virtual async Task MessageReceivedAsync(IDialogContext context, IAwaitable<IMessageActivity> item)
{
var message = await item;
//endpoint v1
if (string.IsNullOrEmpty(await context.GetAccessToken(ConfigurationManager.AppSettings["ActiveDirectory.ResourceId"])))
{
//Navigate to website for Login
await context.Forward(new AzureAuthDialog(ConfigurationManager.AppSettings["ActiveDirectory.ResourceId"]), this.ResumeAfterAuth, message, CancellationToken.None);
else
{
//Logout
await context.Logout();
context.Wait(MessageReceivedAsync);
}
}
///
/// ResumeAfterAuth
///
/// context">
/// result">
///
private async Task ResumeAfterAuth(IDialogContext context, IAwaitable<string> result)
{
//AD resposnse message
var message = await result;
await context.PostAsync(message);
context.Wait(MessageReceivedAsync);
}

After the user enters the first message, our bot will reply and ask to login to the AD. Then, it waits for Authentication code and bot will reply the user details as a response like below.

Building Bot Application with Azure AD Login Authentication using AuthBot

Run Bot Application

The emulator is a desktop application that lets us test and debug our bot on localhost. Now, you can click on "Run the application" in Visual studio and execute in the browser


Building Bot Application with Azure AD Login Authentication using AuthBot
  • Test Application on Bot Emulator
  • You can follow the below steps to test your bot application.
  • Open Bot Emulator.
  • Copy the above localhost url and paste it in emulator e.g. - http://localHost:3979
  • You can append the /api/messages in the above url; e.g. - http://localHost:3979/api/messages.
  • You won't need to specify Microsoft App ID and Microsoft App Password for localhost testing, so click on "Connect".
Building Bot Application with Azure AD Login Authentication using AuthBot

Related Article:

I have explained about Bot framework Installation, deployment and implementation in the below article

Summary

In this article, you learned how to create a Bot Azure AD login authentication and Logout using AuthBot. If you have any questions/feedback/ issues, please write in the comment box.



Featured Post

Xamarin : Step-by-Step Guide To Building .NET Multi-platform App (MAUI) using Visual Studio 2019 Preview 16.10

Xamarin was released 10 years before, it has helped many developers to develop mobile apps with multi-platform with native feel but now it’s...

Popular Posts