Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step 1. Setup Authentication in MS Teams

  1. Goto https://portal.azure.com/ and login

  2. Click on App registrations
    Image Modified

  3. Click on view API Permission

  4. Add the scope needed, we added these

...

  1. Image Added



  2. Click Enterprise applications in the buttom

...

  1. Image Added
  2. Click the big blue button: Grant admin consent

...

  1. Image Added
  2. Click on Authentications menu.

  3. Click Add a redirect. Add the url to iHub as stated in the OAuth credential page.

...

  1. Image Added



  2. Click on Overview and click on the Endpoints this will display all endpoints needed for your instance

  3. Go to Certificates & secrets  and click on new Client secret to generate the client secret, copy this it will only be shown one time.

Step 2. Setup Authentication in iHub

  1. Click on Credentials

  2. Select Oauth2 and enter a name, click add

  3. Fill inte form:




  4. Authorize URLhttps://login.microsoftonline.com/yourgroupid/oauth2/v2.0/authorize see bullet 9 in Step 1.
    Access token urlhttps://login.microsoftonline.com/yourgroupid/oauth2/v2.0/token see bullet 9 in Step 1.
    Client IDcopy 

    Client Secretcopy the Client Secret from bullet 10 in Step 1.
    Scopehttps://graph.microsoft.com/.default offline_access
    Include stateYes

...


  1. Image Added

Set up an action to send data to MS Teams channel

  1. Click on integrations

  2. Click New → Action and create.

  3. Select POST as method

  4. Add URL to your channel. See Find the Team Id and Channel Id below to find the channel id and group id

  5. Set url to https://graph.microsoft.com/v1.0/teams/<GROUP_ID>/channels/<CHANNEL_ID>/messages

...

  1. Image Added
  2. Add body


  3. Code Block
    {
      "body": {
        "contentType": "html",
        "content": "<b>{{issue.summary}}</b><p>{{issue.description}}</p>"
      }
    }


Find the Team Id and Channel Id

This URL contains 3 pieces of information. The first is the Channel ID this begins with the 19% or 19:, the second is the GroupID which is associated with the Team, and the Third is the Tenant ID associated with your environment/organization. For our purposes today, remove everything shown in red as shown in the screenshot. The value you are left with is your Team ID.


Reference API

https://docs.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http

...