Giter VIP home page Giter VIP logo

teams-integration's Introduction

Teams Integration - Send messages to a MS Teams channel

This software will help automation tools send messages to a MS Teams channel

Requisites

  1. Python 3

  2. Python requests dependency

    pip install requests
    
  3. An applicatin in the Active Directory with the permissions:

    • ChannelMessage.Send
    • user.read

Configuration

Create a file named config.json with contents:

{
  "tenant_id": "xxxx-aaa-bbbb (uuid)",
  "app_id": "xxx-aaaa-bbbb (uuid)",
  "email": "your email",
  "password": "your senha",
  "client_secret": "secret obtained from the app",
  "group": "group id (team)",
  "default_channel": "channel",
  "channels": {
    "alias": "id",
    ...
  }
}

Using docker

This project has Dockerfile and docker-compose.yml for convenience. If you wish to develop using docker:

Start with

$ docker-compose up -d

Then run the application with

$ docker-compose exec app teams-msg [args]

When you are done

$ docker-compose down

Giving consent

In your browser go to

https://login.microsoftonline.com/{tenant-id}/oauth2/authorize?client_id={app-id}&prompt=consent&response_type=code&redirect_uri=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fnativeclient

and follow the instructions

Getting ids for group and channel

Go to MS Teams e select the channel. Click the ellipsis (...) and choose the menu option "Get link to channel"

Example URL

https://teams.microsoft.com/l/channel/{id-do-canal}/{nome-do-canal}?groupId={id-do-grupo}&tenantId={id-to-tenant}

teams-integration's People

Contributors

fguerco avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.