Прочитај на енглеском Уреди

Делите путем

Unfurl links in Teams using bot

Create your bot

Create an Azure bot resource

Напомена

If you're already testing your bot in Teams, sign out of this app and Teams. To see this change, sign in again.

  1. Go to Home.

  2. Select + Create a resource.

  3. In the search box, enter Azure Bot.

  4. Select Enter.

  5. Select Azure Bot.

  6. Select Create.

    Screenshot shows the creation of Azure bot.

  7. Enter the bot name in Bot handle.

  8. Select your Subscription from the dropdown list.

  9. Select your Resource group from the dropdown list.

    Screenshot shows the option resource group and subscription in the Azure portal.

    If you don't have an existing resource group, you can create a new resource group. To create a new resource group, follow these steps:

    1. Select Create new.
    2. Enter the resource name and select OK.
    3. Select a location from New resource group location dropdown list.

    Screenshot shows the new resource group option in Azure portal.

  10. Under Pricing, select Change plan.

    Screenshot shows the pricing option in Azure portal.

  11. Select FO Free > Select.

    Screenshot shows the option to select free.

  12. Under Microsoft App ID, select Type of App as Multi Tenant.

  13. In the Creation type, select Use existing app registration.

  14. Enter the App ID.

    Напомена

    You can't create more than one bot with the same Microsoft App ID.

  15. Select Review + create.

    Screenshot shows the creation of new bot.

  16. After the validation passes, select Create.

    The bot takes a few minutes to provision.

  17. Select Go to resource.

    Screenshot shows the Go to resource option in the Azure portal.

    You've successfully created your Azure bot.

    Screenshot shows the output of a bot.

Add a Teams channel

  1. In the left pane, select Channels.

  2. Under Available Channels, select Microsoft Teams.

    Screenshot shows the selection of Teams in channels.

  3. Select the checkbox to accept the Terms of Service.

  4. Select Agree.

    Screenshot shows the acceptance of terms of service.

  5. Select Apply.

    Screenshot shows the Microsoft Teams as messaging to apply.

To add a messaging endpoint

  1. Use the dev tunnel URL in the Output console as the messaging endpoint.

    Screenshot shows the url in the Visual studio output console.

  2. In the left pane, under Settings, select Configuration.

  3. Update the Messaging endpoint in the format https://your-devtunnel-domain/api/messages.

    Screenshot shows the messaging endpoint adding api.

  4. Select Apply.

    You've successfully set up a bot in Azure Bot service.

    Напомена

    If the Application Insights Instrumentation key shows an error, update with App ID.

Add an OAuth connection settings

  1. In the left pane, select Configuration.

  2. Select Add OAuth Connection Settings.

  3. Under New Connection Setting, update the following details:

    • Name: Enter a name for your new connection setting. You can use the name in the settings of your bot service code.
    • Service Provider: From the dropdown list, select Azure Active Directory v2.
    • Client id: Update your Microsoft App ID.
    • Client secret: Update the client secrets Value.
    • Token Exchange URL: Update the Application ID URI.
    • Tenant ID: Enter Common.
    • Scopes: Enter User.Read.
  4. Select Save.

    Screenshot shows the values added to set OAuth connection.