â˜ī¸
GigaCode
Microsoft Azure
  • 🏠Welcome!
  • đŸ’ģTechnology
    • 🔐Cybersecurity
      • 🚨In the Wild - Abusing JWT Encoding
    • đŸŒŠī¸Cloud Concepts
      • Microsoft Azure
        • 🔮Cognitive AI Services
          • Speech Services
            • Speech to Text
              • Choosing Transcription Methods
              • Provisioning your Cognitive Speech Services
              • Batch Transcription
        • 💸Cost Management
          • Intro to Azure Cost Management
          • Automating Azure Cost Management
        • 🤖Bot Framework
          • Intro to Bot Framework
          • Creating your Bot Service
          • Interacting with your Bot Service's API
          • Sending Proactive Messages
          • Packaging Your Bot
    • Zero Trust Networking
      • What is Zero Trust
      • Setting Up Your Tenant
  • 😀People
    • The Human Side of Tech
      • Your Mental Bandwidth
      • Managing Internal Expectations
      • The Multitasking Myth
Powered by GitBook
On this page
  • Creating a Bot Service resource
  • Types of App Identities
  • Configuring the Bot Service
  • Getting your bot's Authentication

Was this helpful?

  1. Technology
  2. Cloud Concepts
  3. Microsoft Azure
  4. Bot Framework

Creating your Bot Service

Some housekeeping before the fun stuff...

PreviousIntro to Bot FrameworkNextInteracting with your Bot Service's API

Last updated 1 year ago

Was this helpful?

Creating a Bot Service resource

Before we can start working on the bot logic itself, we need to make the Bot Service that will support the rest of this project. In your Microsoft Azure portal, head to the resource group you want the resource to be created in. Then, click the Create button.

In the Marketplace, search for Bot and create a new Azure Bot resource

Tip: Check the "Azure Services Only" box to easier find Azure resources

On the Basics tab, create a handle for your bot. This is a unique ID for your bot, and while you can change its display name later, you cannot change the handle. Set the subscription, resource group, and data residency. Select the free plan under Pricing.

Types of App Identities

Choosing the correct App Type under Microsoft App ID is crucial. The different types are:

  • Single Tenant Identity

    • For Bots that will only be accessed from your tenant and will use your tenant for authentication. This is only supported by the C# and JavaScript SDK.

    • Authentication is handled with Client ID and Secret

  • Multi Tenant Identity

    • For bots that will be accessed from multiple Microsoft tenants and will use the bot service for authentication. Supported by all SDKs.

    • Authentication is handled with Client ID and Secret

  • User Assigned Managed Identity

    • For bots that will be accessed from multiple Microsoft tenants and will use the bot service for authentication. Supported by only the C# and JavaScript SDK.

    • Authentication is handled by an Azure Managed Identity, and cannot be used with Client ID and Secret

Given these behaviors, we'll choose Multi-Tenant as we want a Client ID and Secret to be used by our RPA platform. If we were making a bot that was hosted on an Azure App Service, Managed Identity would be recommended.

You can now proceed to assign any tags you may want, and create the resource

Configuring the Bot Service

Customizing your bot

Once your resource is created, navigate to it. Select Bot Profile under Settings in the left navigation bar

On the Profile page you can set your bot's icon, name, and description

Connecting your bot to Teams

Click the Channels button in the left navigation bar

Select the Microsoft Teams channel

Accept the terms and click the Apply button to choose the Microsoft Teams Commercial channel. You'll now see Teams under your connected channels with a Healthy icon

Getting your bot's Authentication

Your bot will happily send requests to you all day, but when responding you need to specify who you are back. By selecting Multi-Tenant on our app type, a new App Registration has been created in our Azure Active Directory tenant. Head on over to the Entra portal -> Azure AD -> Applications -> App Registrations

Under Owned Applications, select your bot

In the Essentials tab on the Overview page, note the Application (client) ID, and Directory (tenant) ID

Go to Certificates & Secrets, then create a new Client Secret. Name this secret and set its validity length

Copy the Secret Value to your clipboard before leaving the page! This secret will not be shown again, so document it somewhere safe

đŸ’ģ
đŸŒŠī¸
🤖
Icon courtesy of DALL-E :)