Building a Simple Bot for Microsoft Teams – Part 1 – Getting your tenant ready

This is a series of blog posts that will walk through the following:

These posts are based on the Preview Microsoft Teams Developer Platform.

Tenancy Requirements

Firstly you need an Office 365 tenancy in which you can safely play with settings and develop. Currently the following plans are suitable:

  • Business Essentials
  • Business Premium
  • Enterprise E1, E3, and E5
  • Developer

If you don’t have a development tenant already sign up at to get a trial one.

Relevant Sample

In these blog posts we are walking through creating piece by piece and using the configuration interfaces as much as possible.  Once you understand the parts and especially if you are creating a more complex example it is worth looking at the yo teams-tab: A Microsoft Teams Tabs Yeoman generator

Enabling Teams

Now that teams has reached GA it should be turned on in your tenancy by default. However if you are using a shared tenancy then it may of been turned off, hence the first step it to navigate to the  Office 365 Admin center > Services & add-ins page and selecting Microsoft Teams.

Teams Settings

Once selecting Microsoft Teams firstly we want to check that Teams is turned on at the top of the settings page.  This enables it for the tenancy.
As we want to do some development that will include side loading out bots and tabs while we test them it is important to turn on side loading as it is disabled by default.
These settings enabled are show below:

Teams Enable

None of the other settings are required for this particular example , however while you are in the settings page it is worth clicking through and learning about some of the other settings. The Giphy settings under Messaging is one of my favourite features for making chat more fun !

Licensing users for Teams

By default teams should be enabled when you license users for a normal Office 365 license such as E3. However if you do have a need to only have certain users access teams you do have an option of turning the licensing option on/off for a specific user. This can be done via the UI by navigating the the users page in the Admin center and then selecting the users licensing. Here you can see each individual license you can enable/disable.

Teams Licensing

To do this at scale for a large number of users there are two main options. The first of this is via script. There are many example scripts/blog posts available , here is a specific example for removing the license for flow and teams. You can also use the new  Azure Group Based Licensing UI to perform various licensing scenarios as well.

Adding a Team

Adding a team is very simple. Once you navigate to Microsoft Teams down the bottom you will see an Add team link. However depending on your settings for creating Office 365 Groups it may not behave 100% as you may expect.
If you have disable group creation then you will get navigated to the suggested teams section and then when clicking on create a team you will get the following message:

Sorry, you can’t create a team.

Your IT department has disabled this Microsoft Teams feature for you. Please contact them for help.
To resolve this you need to ensure group creation is enabled, here is a great blog post on Configuring Office 365 Groups creation the right way , note that if you are looking at the groups creation settings in the Azure Active Directory – Preview portal at the moment these are often inaccurate , hence checking via script is highly recommended at the current time.
Also worth noting is that if you are the owner of a Office 365 Group that has less than 999 members you will have the capability to add a Microsoft Team to it. This is done by selecting the “Yes, add Microsoft Teams functionality” at the bottom of the add dialog.
Add Team
All the relevant limits for Microsoft Teams such as number of owners, members and maximum number of teams in a tenancy plus a lot more are contained in the support FAQ
Now your tenancy is all setup lets start developing in Part 2 – Building a basic Q&A Bot for Microsoft Teams






Office 365 Groups – Ignite Aus wrap up

During my session on managing groups at Ignite Australia on deploying and managing groups I referenced this great blog post by Wictor Wilen which explains all the details of how to script changing the settings via script at the Azure AD level.

For my provisioning demonstration I also used the Office 365 PnP-Powershell commands – the installer for the current version of these are here  and specifically the New-PnPUnifiedGroup command. To have this command you need to be on at least the Nov 2016 release of the commands.

More information on development samples such as how to create tabs and integrate bots into Microsoft teams are explained on the teams dev center. I also found this overview of connectors to be useful although some of the UI has changed recently which means if you follow the demonstrations steps in your tenancy you will need to adapt a couple of the steps.  The major change is that for basic connectors you can select the webhook connector now straight from the main connector UI as that is now GA.

During the session I also mention an earlier session in the conference which went into the roadmap for Groups, definitely worth a view to get across the new features due to arrive soon.

Also for more information on what to use where in regards to groups , teams and yammer this session is well worth the watch