Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Building a Microsoft Teams bot is easy в хорошем качестве

Building a Microsoft Teams bot is easy 3 года назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Building a Microsoft Teams bot is easy

Setting up a Microsoft Teams bot using .NET and the Microsoft BotBuilder SDK. As much as the existing documentation can seem a little daunting at first, it's actually relatively straightforward to get started 😊 Check this article where I continue this setup to create a working proactive Teams bot: 1. Follow this tutorial (https://docs.microsoft.com/en-us/azur...) to set up a bot registration in Azure. Make sure you keep track of the app ID and password created in the article! 2. Start a new .NET core web API project and install the Botbuilder and Botbuilder Integration NuGet packages (there are corresponding NPM/Pip/Maven packages for your language or choice if you're using Javascript/Typescript/Python/Java instead). 3. Create a controller like this one  (https://github.com/pyramid-scheme-ceo...) this is the endpoint in our app which we'll tell Azure to forward any bot-related events to. 4. Create the "bot" itself. In .NET, this is done by creating a class that inherits from the TeamsActivityHandler base class. This class has heaps of fun methods like onMembersAdded and onMessageActivity that we can override to execute our own custom logic whenever users install our bot/send messages to it/do any number of other useful things. Usually I start by setting up a near-empty bot (like the one below), which I then use to set a breakpoint on and verify everything is working correctly before actually trying to do anything new. 5. Wire up your code correctly so the bot is passed to your controller - either using dependency injection or by newing up instances of everything (please try to avoid the second option for the sake of programmers everywhere). 6. Plug the MicrosoftAppId and MicrosoftAppPassword values from step 1 into your appsettings.json file (make sure they're actually named these exact names or it won't work, we wouldn't want to upset Microsoft now would we?) 7. Start your app and make sure it's running. Take note of the port your app is running on for the next step. 8. Download ngrok (it's free 🎉) and start it up. The command I use is along the lines of .
grok.exe http {the port from step 7} --host-header=localhost. The host-header flag is something needed by the bot's authentication mechanism and it won't work properly without it. 9. Navigate to your bot channels registration in the Azure portal and update the 'Messging endpoint' in the configuration section to match the ngrok domain you've been given and the path that your controller is at. 10a. Download app studio from the MS Teams app store. 10b. Open the app and click 'Create a new app' 10c. Fill in the 'App Details' section with any bogus details & images you want. 10d. Click the 'Bots' section, then the 'Set up' button and navigate to the 'Existing bot' tab. From here, you can click 'Select from one of my existing bots' - you may be lucky and Azure and Teams will work together to allow you to select the app registration you completed in step 1. If not, simply select 'connect to another bot id' and paste in the bot's app registration ID from earlier (the value you used for the MicrosoftAppId in our app's config). Now select all the scopes you want this bot to be able to be installed to and click 'Save'. 10e. Finally, (make sure you have breakpoints set everywhere in your program first ready for debugging) visit the 'Test and distribute' section of the App studio where you can now install the bot to a channel in Teams and install it. 11. If everything is working correctly, Azure should have detected your bot was installed in Teams, forwarded an event to your ngrok address, which passes the event to your locally-running app, which decodes and executes that event against our bot, hopefully without any errors. 12. Breathe a sigh of relief, you're now ready to start writing apps for MS Teams 🎈

Comments