Integrate ownCloud into Microsoft Teams

Introduction

If you’re using Microsoft Teams in your organization or for private purposes, you will likely want to access your ownCloud installation from your Microsoft Teams account. For this purpose, we created the ownCloud Generator for Admins with which you can generate a customized Microsoft Teams app for your users accessing your ownCloud services. Each ownCloud domain to be accessed requires a separate generated Microsoft Teams app for your users. The generated app must then be uploaded in your organization’s app catalog.

As a prerequisite, the OpenID Connect app is required. If you already have a OpenID Connect configuration made with another service, you have to reconfigure with Microsoft Azure AD, as only one identity provider configuration is allowed.

Prerequisites

To get this working, you need to install and/or configure the following components:

Option 1 "Enterprise": With Single Sign-On (SSO) and ownCloud Enterprise Edition

  1. Microsoft Azure Active Directory

  2. ownCloud apps:

  3. The custom app(s) you have generated with ownCloud Generator for Admins

  4. Microsoft Teams

Option 2 "Standard": With Basic Authentication and ownCloud Standard Edition

  1. ownCloud apps:

  2. The custom Microsoft Teams app(s) you have generated with the ownCloud Generator for Admins

  3. Microsoft Teams

Note: If you are using the Standard Edition, you can skip the following steps that describe the configuration of Azure AD and the MS-Teams Bridge App.

ownCloud

Installation

Assuming you have an ownCloud server version 10.7 or higher already running in your company or for personal use, perform the following steps:

  1. Install and enable the MS-Teams Bridge app, minimum required version: v1.0.0.

  2. Install and enable the OpenID Connect app from the ownCloud marketplace, minimum required version: v2.0.0.

Configure the MS-Teams Bridge App

You need to configure the MS-Teams Bridge app in two steps:

  1. Add a header directive to the Apache .htaccess configuration located in your ownCloud web root in section <IfModule mod_env.c>

    Header merge Content-Security-Policy "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com"
    Header edit* Content-Security-Policy , ;

    Using merge, the response header is appended to any existing header of the same name, unless the value to be appended already appears in the header’s comma-delimited list of values. When a new value is merged onto an existing header it is separated from the existing header with a comma. Merging avoids that headers of the same type and content being sent multiple times. This can happen if headers are also set on other locations.

    For the time being, if you add the header to the ownCloud’s .htaccess file in the ownCloud web root, you have to manually add that header again after an ownCloud upgrade.
  2. Add a config key to your config.php file

    This key is necessary for security reasons. Users will be asked to click a login button each time when accessing the ownCloud app after a fresh start of their Microsoft Teams app or after idle time. This behavior is by design. The button name can be freely set based on your requirements.

    'msteamsbridge' => [
       "loginButtonName" => "Login to ownCloud with Azure AD",
    ],
  3. Enable index.php less URL´s on your web server.

Microsoft

Microsoft Azure and OpenID Connect

Before you start to create your Microsoft Teams App, follow the procedure described in Example Setup Using Microsoft Azure to configure Microsoft Azure AD and OpenID Connect.

Create Your Microsoft Teams App

The following procedure creates an ownCloud app ready to be used by your users with Microsoft Teams in your environment.

  1. In ownCloud Generator for Admins follow the guided instructions step by step.

  2. Enter the Microsoft App/Client ID for your app. The ID´s to be entered must be the CLIENT-ID from Microsoft Azure.

    enter app id msteamsgen

  3. Enter the version of the app you create.

    define app version msteamsgen

  4. Enter the name of the app you create. Take care about how to name your app. It cannot be changed later on. We recommend naming it ownCloud for Teams for easy identification.

    app name msteamsgen

  5. Enter the description of the app you create.

    app description msteamsgen

  6. Set the AccentColor of the app you create.

    set accent color msteamsgen

  7. Enter the URL how you access your owncloud instance like https://cloud.example.com.

    owncloud url msteamsgen

  8. After performing all the steps, click the download button and store the generated zip file locally.

    download zip msteamsgen

  9. Go to the app section of Microsoft Teams and upload the generated zip file to your organization’s app catalogue. Follow the Publish a custom app by uploading an app package guide for more information.

  10. The new app is now available to users in your organization’s app catalog.

  11. See the following documents on how to pin the app, set the order how apps appear or how to install apps on behalf of users.

See the users documentation about their necessary steps how to integrate ownCloud into Microsoft Teams.

Alternative ownCloud Website Tab

As an alternative to creating an app for Microsoft Teams, it’s also possible to embed ownCloud as a Microsoft Teams tab website. Tabs are Teams-aware webpages embedded in Microsoft Teams. See the What are Microsoft Teams tabs documentation to find out more.

  1. Press the + plus button at the top of the Teams window.

    add a tab ms teams

  2. Search for website and add by clicking on it.

    add website ms teams

  3. Add a meaningful name and the following URL replacing "cloud.example.com" with how you access your ownCloud instance.

    name and url ms teams

    https://cloud.example.com/apps/msteamsbridge

Support

If you encounter problems with the integration of ownCloud and Teams, please contact us via eMail at support@owncloud.com or look for answers to those problems at the Forum