Cookie CSS

Saturday, October 28, 2017

Your First No Code Bot for Microsoft Teams - Part 2 #MicrosoftTeams #MsTeams


Microsoft Teams is a chat-based collaboration tool that is part of the Office 365 suite of services. Teams enables local and co-workers to work together and collaborate through a common work-space, using features such as team chat, one-on-one chat and document collaboration.





Last week I showed you how to build our a simple question and answer template for Microsoft Bot.  Today we'll look at how to create the bot in Azure and use our Q and A template.

You will need an Azure subscription to get started, if you have one, get one first.

Step 1.

In Azure, click New from the blade menu.

Select Data + Analytics or search for Bot Service.

Once you find it click Create.

Bot Service blade

Give it a name, and select your resource group, hosting plan, and location.

After you click create, wait until it shows deployment succeeded, then go to the resource.

Step 2.

Select your programming language.

The options there are c# and NodeJs

language


Step 3.

Select your template and create your bot.

It will default to basic, but you want to click Question and Answer instead.


Select the Q and A maker template you saved.

Step 4.

Create the App ID and Password.

create app id

Here you will generate an app password to continue.  Copy and save this value.  Then click finish.

Back in the azure portal you will you have the rest of the fields auto populated, just paste in password.

password

Now your bot is created and tied to your Q and A template.  Next week I'll show you how to use your bot in a webpage, Skype, Teams, etc.



Doug Routledge

Teams, Skype for Business, SQL, Exchange, UC, Full Stack Developer

Doug is the co-found of Bridge Communications, and also leads the development team.


Saturday, October 21, 2017

Your First No Code Bot for Microsoft Teams - Part 1 #MicrosoftTeams #MsTeams


Microsoft Teams is a chat-based collaboration tool that is part of the Office 365 suite of services. Teams enables local and co-workers to work together and collaborate through a common work-space, using features such as team chat, one-on-one chat and document collaboration.



One way for people to interact with Microsoft Teams is through Bots.  Most non programmers think creating a Bot for Teams/Skype/Facebook etc is beyond their capability.  To be honest creating a Bot with the Bot Framework is not hello world, it's not something a user with no programming experience is going to do easily.  Enter Microsoft's Q and A maker.

The idea behind the Q and A maker is to take an existing knowledge-base website, and turn it into a responsive Bot you can interact with in your favorite applications.  There are 2 ways to get started with it, you can have it try to import a website and build the questions or answers.  This doesn't work all that well in my experience.  The 2nd way is to create question and answer pairs in the portal, retrain, and publish changes, which will flow instantly into your Bot.


Step 1.  Go to the website and sign in.


Step 2.  Create a service.



Step 3.  Enter some questions and answers




When you are done click "Save and Retrain", then click "Publish".  Next week I'll show you how to create the actual Bot in Azure and select the QandAMaker template, which will do all the coding for you, and have your bot up and running in less than a minute.





Doug Routledge

Teams, Skype for Business, SQL, Exchange, UC, Full Stack Developer

Doug is the co-found of Bridge Communications, and also leads the development team.


Saturday, October 14, 2017

Getting Started with Microsoft Teams Tabs - Part 6 #MicrosoftTeams



Microsoft Teams is a chat-based collaboration tool that is part of the Office 365 suite of services. Teams enables local and co-workers to work together and collaborate through a common work-space, using features such as team chat, one-on-one chat and document collaboration.





Other Caveats

Redirecting to Another Domain

You may find yourself in a situation where a configuration page, needs to redirect your user to page that lies on a different domain.  In order to keep the data Teams is feeding your page in the iframe you should avoid normal page redirection, and instead us this method.

First make sure your domain is listed in the validDomains sections of the manifest.  Without this you will wind up with issues.

Now to being the redirection you will want to call this function from the Microsoft Teams javascript library.

microsoftTeams.navigateCrossDomain(yourNewUrl)

This will keep Teams happy and allow your other landing page to successfully initialize the teams js object.

Static Tabs

Sometimes you don't need a configuration page, if this is the case, a static tab is for you.  You can lay out a static tab with a manifest like this;

"staticTabs": [ { "entityId": "TestAppAbout", "name": "About", "contentUrl": "https://teams-specific-webview.website.com/about", "websiteUrl": "http://fullwebsite.website.com/about", "scopes": [ "personal" ] }, { "entityId": "TestAppMyTasks", "name": "My Tasks", "contentUrl": "https://teams-specific-webview.website.com/mytasks", "websiteUrl": "http://fullwebsite.website.com/mytasks", "scopes": [ "personal" ] } ]



The staticTabs object allows you to specify one or more tabs, up to 16, with the following required elements:
entityId A user-defined ID that uniquely identifies the tab; analogous to the entityId used in deep links to a configurable tab
name The name shown on the tab
contentUrl The content URL to show in the tab
websiteUrl The URL to the full chrome content to display in the default browser
scopes At this point, static tabs are used only in the personal context


Add static tab URLs to validDomains

All URLs you add in static tabs must be referenced in the validDomains section of the manifest. Failure to do so could result in a blank tab. Please note that although you can use wildcards for subdomains, be sure to appropriately scope for only the content you control and expect in the tab experience. For example, yourapp.onmicrosoft.com is good, but *.onmicrosoft.com is not.


Next week I'll walk you through how to sideload your app to get it up and running quickly.



Doug Routledge

Teams, Skype for Business, SQL, Exchange, UC, Full Stack Developer

Doug is the co-found of Bridge Communications, and also leads the development team.


Saturday, October 7, 2017

Getting Started with Microsoft Teams Tabs - Part 5 #MicrosoftTeams


Microsoft Teams is a chat-based collaboration tool that is part of the Office 365 suite of services. Teams enables local and co-workers to work together and collaborate through a common work-space, using features such as team chat, one-on-one chat and document collaboration.




Graph in Tabs

Microsoft Graph is one of the best APIs out there. It gives developers access to almost every o365 service and the data that lives in them. You would think that Graph and Teams would be tightly tied together, and at some point they may be. As of today, there are a few gotchas you need to look out for when combining these two.

Here is what Microsoft says about using them;


To use the Microsoft Graph APIs, you must get an access token. When your app is running in Microsoft Teams, the only difference is that you must drive the authentication flow, as described in Authenticate a user in your Microsoft Teams tab.

Be careful if you use the Microsoft Graph APIs for team resources, rather than those for the current user, because the two have different consent models. Typically, users can directly consent to your Microsoft Teams app within a specific team. However, currently an admin must also consent to your app (as registered in Azure Active Directory) using these group APIs, at which point the app then has API access to all the groups or teams for each user. (See Group permissions for more information.) You should therefore ensure that your Microsoft Teams app handles not having the permissions it needs, and that it respects the user's intention about the teams in which it should operate.


The biggest thing I have noticed from a gotcha standpoint, is using a SPA website you would normally get your token by a login redirect, then reading the location hash on return. It seems to me that when a page is displayed in a teams iframe, the same location hash is used to pass the information to teams js library, so login in to graph in the normal SPA way seems to break that, so it becomes an either or in SPA.

If you are looking to get Teams Graph info from the beta channel the good news is your an build a server side API and use the Azure AD client/secret model to serve up a token to your SPA page without the need for login redirection and access that data.

These issues are going to need to have a little better solution long term, if indeed the audio manipulation API is going to be a graph api, because one will want to see only the current logged in user for call manipulation, and frankly there are going to be organizations that will not want to give every 3rd party app, access to too much non user scope permissions.


Doug Routledge

Teams, Skype for Business, SQL, Exchange, UC, Full Stack Developer

Doug is the co-found of Bridge Communications, and also leads the development team.