logo
Connectors

Microsoft Teams

Integrate Microsoft Teams with AINexLayer

Microsoft Teams OAuth Connection Guide

This guide explains how to set up a Microsoft Teams OAuth integration for AINexLayer using Azure App Registration.

Step 1: Accessing Azure App Registrations

  1. Navigate to portal.azure.com
  2. In the search bar, type "app reg"
  3. Select "App registrations" from the Services results

Azure Portal Search

Step 2: Creating a New Registration

  1. On the App registrations page, click "+ New registration"

App Registrations Page

Step 3: Registering the Application

Complete the application details:

FieldValue
NameAINexLayer
Supported account typesSelect "Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts"
Redirect URIPlatform: Web, URI: http://localhost:8000/api/v1/auth/teams/connector/callback

Click "Register"

Register Application Form

Step 4: Obtaining Application (Client) ID

After registration, you'll be taken to the app's Overview page. Here you'll find:

  1. Copy the Application (client) ID - this is your Client ID
  2. Note the Directory (tenant) ID if needed

Application Overview

Step 5: Creating a Client Secret

  1. In the left sidebar under Manage, click "Certificates & secrets"
  2. Select the "Client secrets" tab
  3. Click "+ New client secret"
  4. Enter a description (e.g., AINexLayer) and select an expiration period
  5. Click "Add"

Certificates & Secrets - Empty

  1. Important: Copy the secret Value immediately - it won't be shown again!

Certificates & Secrets - Created

Never share your client secret publicly or include it in code repositories.

Step 6: Configuring API Permissions

  1. In the left sidebar under Manage, click "API permissions"
  2. Click "+ Add a permission"
  3. Select "Microsoft Graph"
  4. Select "Delegated permissions"
  5. Add the following permissions:
PermissionTypeDescriptionAdmin Consent
Channel.ReadBasic.AllDelegatedRead the names and descriptions of channelsNo
ChannelMessage.Read.AllDelegatedRead user channel messagesYes
offline_accessDelegatedMaintain access to data you have given it access toNo
Team.ReadBasic.AllDelegatedRead the names and descriptions of teamsNo
User.ReadDelegatedSign in and read user profileNo
  1. Click "Add permissions"

The ChannelMessage.Read.All permission requires admin consent. An admin will need to click "Grant admin consent for [Directory]" for full functionality.

API Permissions


Deploying AINexLayer with Microsoft Teams Connector

Add the Microsoft Teams credentials to your .env file (created during Docker installation):

TEAMS_CLIENT_ID=your_microsoft_client_id
TEAMS_CLIENT_SECRET=your_microsoft_client_secret
TEAMS_REDIRECT_URI=http://localhost:8000/api/v1/auth/teams/connector/callback

Then restart the services:

docker compose up -d

On this page