# Creating An Enterprise Bot Using Microsoft App Studio

MICROSOFT APP STUDIO IS DEPRECATED

On January 1, 2022, Microsoft will deprecate App Studio. To create Enterprise Workbots, use the Microsoft Teams Developer Portal guide. We're retaining this guide for reference only.


To set up an Enterprise Bot, you need:

  • The following in Workato:

    • Access to:
      • Workbot. If you don't see the Tools > Workbot option in your account, contact your Customer Success Manager.
      • Custom OAuth profiles. If you don't see the Tools > Custom OAuth Profiles option in your account, contact your Customer Success Manager.
    • Privileges that allow you to:
      • Create and configure Workbots.
      • Create and configure connections.
      • Create and configure Custom OAuth Profiles.
  • One of the following roles in your Microsoft organization:

    • Application administrator
    • Cloud application administrator
    • Global administrator
    • Privileged role administrator

    Check your role assignments in Microsoft (opens new window) by navigating to Users > You (select your name) > Assigned roles.


# Step 1: Create The Workbot In Workato

1

Sign in to your Workato account.

2

Navigate to Tools > Workbot.

3

Click the Custom bot tab, then + New custom bot.

4

In the Application field, select Workbot for Microsoft Teams.

5

In the Name field, enter a name for the bot.

6

Click Create new app.

Keep this page open - you'll need it to complete the setup for your bot.


# Step 2: Create A Microsoft Teams App

# Step 2.1: Install Microsoft App Studio

NOTE

If you already have App Studio installed, skip to the next step.

1

Sign in to your Microsoft Teams account.

2

From the left navigation menu, click the ellipsis (...) and search for App Studio.

3

Click and install App Studio.

# Step 2.2: Create And Configure An App

1

In App Studio, navigate to the Manifest editor tab.

2

Click Create new app.

3

On the page that displays, fill in the following:

  • Short name: A short name for your bot. For example: OpsBot

  • Full name: Optional. The full name of your bot. For example: Opportunities Bot

  • App ID: Click Generate to generate an App ID.

    SAVE THIS INFO!

    Keep the App ID handy - you'll need it to complete the bot setup in Workato.

  • Package name: Enter the package name in reverse domain format. For example: com.workato.opsbot

  • Version: Enter the version of your bot. The version will typically be 1.0.0 for a new bot.

  • Short description: Enter a short description of your bot.

  • Full description: Enter a long description of your bot. Note: Microsoft will reject the full description if it contains the same text as the Short description.

  • Website: Enter https://www.workato.com

  • Privacy statement: Enter https://www.workato.com/legal/privacy-policy

  • Terms of use: Enter https://www.workato.com/legal/terms-of-service

  • Branding: We recommend using your app's own icons, but the default Workbot icons can also be used. If using your own, verify that the icons meet Microsoft's size requirements.

    To use the default Workbot icons, right-click and save the following:

    • Full color (192x192 pixels):

    • Transparent outline (32x32 pixels: The image looks blank, but it's there. Use #108921 as the accent color.

# Step 2.3: Add A Personal Tab To Your Bot

THIS STEP IS OPTIONAL

Skip to the next step if you don't want to add a personal tab to your bot.

1

In the left navigation bar, click Capabilities > Tabs.

2

Click Add a personal tab.

3

In the window that displays, fill in the following:

  • Name: Enter Getting started
  • Entity ID: Enter gettingstarted
  • Content URL: Enter https://docs.workato.com/workbot-for-teams/getting-started.html
  • Website URL: Enter https://docs.workato.com/workbot-for-teams/getting-started.html
4

Click Save.

The page should look like the following when you're finished:

# Step 2.4: Obtain Bot Credentials

# Step 2.4.1: Obtain Client ID

1

In the left navigation bar, click Capabilities > Bots.

2

Click Set up.

3

Give your bot a name. For example: OpsBot

4

Under Scopes, select the following scopes:

  • Personal
  • Team
  • Group Chat

After the bot has been created, locate the Bot ID under the bot's name. The Bot ID will be used as your bot's Client ID, so keep it handy - you'll need it to complete the setup in Workato.

# Step 2.4.2: Obtain Client Secret

Under App passwords, select Generate new password.

The password will be used as your bot's Client Secret, so keep it handy - you'll need it to complete the setup in Workato.


# Step 3: Configure Workato To Talk To The App

1

Navigate back to the Workato page from Step 1.

2

In the Step 3 section, fill in the following fields:

3

Click Save.

4

Expand the Step 4 section and copy the bot endpoint address. It should look something like this:

https://app.workato.com/skype_webhooks/event?coak_id=42

Keep this handy - you'll need it to complete the next step.


# Step 4: Configure The App To Talk To Workato

# Step 4.1: Configure The Bot's Endpoint Address

1

Navigate back to Microsoft Teams App Studio.

2

Navigate to Manifest editor > Your bot > Capabilities > Bot.

3

In the Messaging endpoint section, paste the bot endpoint address from the previous section into the Bot endpoint address field.

# Step 4.2: Add Workato's Domain to the Allowlist

1

In the left navigation bar, navigate to Finish > Domains and permissions.

2

In the Enter a valid domain field, enter *.workato.com.

3

Click Add. The domain will be added to the Additional valid domains section.

# Step 4.3: Download The Bot Manifest

1

In the left navigation bar, navigate to Finish > Test and distribute.

2

If there are any errors on the right side of the page, resolve them before proceeding. If left unresolved, you may run into issues with installation or downloading your app package (a.k.a. manifest). These issues are typically related to fields in Details > App details or Capabilities > Bots.

When resolved, proceed to the next step.

3

Click Download. Your app's manifest will be downloaded into your default download folder. Take note of the file's location - you'll need it to complete the next step.

# Step 4.4: Upload The Manifest To Your App Store

1

Open a new browser tab and browse to the Microsoft Teams Admin Center (opens new window).

2

In the left navigation bar, navigate to Teams apps > Manage apps.

3

In the apps table, click + Upload.

4

Select and upload the manifest file you downloaded in the previous section. This will upload the bot to the Microsoft tenant app catalog.

# Step 4.5: Add The Bot To A Team/Channel

1

Navigate to your Microsoft tenant app catalog.

2

Find and select your app in the Build for <YOUR_NAME> section. If you don't see the app, sign out and back into Microsoft Teams again.

3

Click the arrow next to the Add button and select Add to team.

4

Enter a team or channel name.

# Step 4.6: Configure Authentication Redirect URLs

2

In the search bar, enter App Registration and select the result.

3

On the page that displays, click on your bot.

4

From the left navigation bar, click Authentication.

5

Under Platform configurations, click +Add a platform/Web.

6

In the Redirect URIs section, add the following URIs:

  • https://www.workato.com/auth/skype/callback
  • https://www.workato.com/users/auth/skype
  • https://www.workato.com/oauth/callback
7

Click Save, located near the top of the page:


# Step 5: Establish A Workbot Connection

1

Open the browser tab with your Workato account.

3

Click Create connection.

4

Search for and click on Workbot for Microsoft Teams in the list of apps.

5

Fill in the following:

  • Connection name: Enter a name for the connection.
  • Location: Select a folder where the connection will be stored.
  • Advanced settings: In API Scope(s), select the API scopes you want the bot to use. By default, User.Read, User.Read.All, and Group.Read.All will be requested.
  • Custom OAuth profile: Select the custom OAuth profile you want the bot to use.

6

Click Connect. You'll be prompted to authenticate yourself in Microsoft Teams.

7

Authenticate yourself and authorize the bot's permissions when prompted.


# Troubleshooting

If you encounter permissions issues during sideloading your app or authentication, check the following settings in the Microsoft Teams admin center (opens new window):

# Org-Wide App Settings

1

Navigate to Teams apps > Manage apps.

2

Click Org-wide app settings.

3

Under Third-party apps, verify that Allow third-party apps is set to On.

4

Under Custom apps, verify that Allow interaction with custom apps is set to On.

5

Click Save.

# Permission Policies

1

Navigate to Teams apps > Permission policies.

2

Select your org-wide policy.

3

Under Third-party apps, verify that Allow all apps is set; alternatively, verify that your app has been allowed.

4

Under Custom apps, verify that Allow all apps is set; alternatively, verify that your app has been allowed.

5

Click Save.

# Setup Policies

1

Go to Teams apps > Setup policies.

2

Select your org-wide policy.

3

Verify that Upload custom apps is set to On.