How to create Microsoft Teams Apps with bots dynamically? - azure

We would like to have an ability to programmatically create Microsoft Teams apps so that they can be installed into the same Microsoft Teams tenant. Since there is no way to pass any data from the app manifest to the bot endpoint we have to create separate bot for each app which will have an endpoint like so /api/messages/:id. This way we can differentiate between the apps/bots on the backend.
We weren't able to find bot Azure APIs to accomplish this easily, aside from low level resource APIs or Azure CLI to create app registry and the bot.
Is this the best way to approach this problem? Any suggestions?

Related

How to develop and deploy several different bots in Azure?

I have developed a bot using Microsoft Bot Framework v3 and C#.Net. I have also deployed the bot in Azure with in a resource group having necessary resources like App Service Plan, App Service, Bot Service etc. Now there is a requirement to create a new bot for different workflow. I want to know what are my chances to use my existing Azure resources. Should I create a new Bot service & App Service in same App Service Plan?
If anyone have created and deployed various different bots in Azure please share the strategy.
It highly depends on your scenarios.
But considering that your different bots must run in parallel:
App Service Plan can be reused, if its pricing is high enough to size to the demands of both bots
Storage account can also be reused as it uses bot Id in its keys (but it would be better to specify different tables for each bot in your dependency injection if using Table Storage)
App Service (where you are exposing your /api/messages endpoint) must be specific if you don't manage a special configuration
App Bot Service (which is linked to this endpoint) must be specific also, as Bot Channel Registration is specific to each bot

Publishing a bot to Microsoft Teams

We would like to publish a bot internally to Microsoft Teams. It seems one way to do this is to enable sideloading external applications in Teams. We do not want to do this as it will allow users to load a bunch of other apps we don't want to expose.
My question is, if I publish my bot to the office store, can other tenants see the bot? I see web apps have the "AvailableToOtherTenants" property and was wondering if this is what prevents other tenants from using our bot.
My goal is to publish a simple QnA bot to members of my organization only.
Thanks.
In this case you would need to publish apps to the Microsoft Teams Tenant Apps Catalog, in order to distribute line-of-business applications only to your organization.

azure app service basic api security

I have running the basic todoitem app service running on azure. Calling the below url will display the content in the todoitem table. How can I add basic security to prevent this data from being accessed by anyone, like a basic parameter, ToDoItem?MyToken=12345.
https://MyappService.azurewebsites.net/tables/ToDoItem
How can I add basic security to prevent this data from being accessed by anyone, like a basic parameter, ToDoItem?MyToken=12345.
I would recommend you using the build-in Authentication and authorization in Azure App Service.
App Service supports five identity providers out of the box: Azure Active Directory, Facebook, Google, Microsoft Account, and Twitter. To expand the built-in support, you can integrate another identity provider or your own custom identity solution.
Here are some great tutorials, you could refer to them:
For Node.js backend, you could follow 30 DAYS OF AZURE MOBILE APPS.
For developing azure mobile apps with C#, you could follow here.

Can I create and deploy Microsoft bot with LUIS but without azure services?

Can I create and deploy Microsoft bot without azure services?
I want to use LUIS services without azure services.
Is it possible? Alternatives for azure?
Thank you for replies in advance
To answer your question - it is possible to create a bot which uses LUIS without using the Microsoft Bot Framework -
Using LUIS: LUIS expose their service via HTTP endpoint. If you create an application in LUIS and create a model, you can get the intents by issuing a request to the provided endpoint. It is not directly associated with Azure. Note that in order to allow unlimited traffic to your endpoint, you will need to associate it with an Azure subscription, but you do not have to use any Azure resources.
Microsoft Bot Framework - In order to create a bot without using the bot framework, first let's understand what services the framework provides you with. you need:
Somewhere to host your bot as a service. You can use any cloud provider for this or even host it on your machine
Build your bot - you bot will have to implement a conversation protocol, depending on the channel for which you are writing your bot
Integrate with the channel for which you are building your bot for - bots for Facebook, Telegram or Skype have different protocols and need to be connected differently with these platforms. The Bot Framework simplifies this process for you. But you can just create a specific bot for your desired platform. For that, you should check the documentation for the channel which you develop for.

Azure Mobile Services - custom authentication provider for all our apps

We plan to use Windows Azure Mobile Services for several of our commercial apps and would like to create a single data store for users instead of creating it for every mobile service. We don't want to use Microsoft or Facebook... providers due to this issue Multiple apps using a single Azure Mobile Service for Live Authentication?
This way, the user data for all our apps is stored in single separate Custom_Auth database and the users won't need to Register again for our other apps. Should we create a separate mobile service that basically enables custom authentication and acts as a provider for other apps?
Do you see any pitfalls with this approach and what steps would I need to take for creating this custom provider as a separate mobile service?
Basically, we want to create our own provider so that user of one our apps can login to the other apps using the same credentials.
I have read through the following links. Posting them here as they may be useful for others starting out with Authentication and Azure Mobile Services.
http://www.thejoyofcode.com/Generating_your_own_ZUMO_auth_token_Day_8_.aspx
http://www.thejoyofcode.com/Fetching_a_basic_user_profile_in_Mobile_Services_Day_9_.aspx
http://www.thejoyofcode.com/Exploring_custom_identity_in_Mobile_Services_Day_12_.aspx
http://chrisrisner.com/Authentication-with-Windows-Azure-Mobile-Services
Thanks in advance
Hope this helps you
http://chrisrisner.com/Authentication-with-iOS-and-Windows-Azure-Mobile-Services
Someone created a custom authentication API using AZURE
with Parse.com, you are limited to their backend and unfortunately it doesn't have all the nice features as Azure
MS really messed us around with this

Resources