Getting Started with Microsoft Teams
Getting Started with Microsoft Teams

Getting Started with Microsoft Teams

Microsoft Teams is cloud-based team collaboration software that offers core capabilities, including business messaging, calling, video meetings and file sharing. Businesses of all sizes can use Teams, which can be accessed via desktop, any internet-connected device and the Teams mobile app.Microsoft Teams integrates with other Microsoft business applications, including Exchange, PowerPoint and SharePoint

Microsoft Teams provide features like chat, calls, video conferencing, screen sharing, polling, webinars, etc.


  1. Team : Teams are groups of people who connect and collaborate on work and other projects.
  2. Channel : Within each team, users can create channels to organize their communications by topic, like news items, monthly reports or more lighthearted chats. A channel can be public or private. Private channel is the most secured way to share confidential data.
  3. Mentions : Users can use mentions to message and alert other users
  4. Feeds : The activity feed provides a summary of messages, replies, mentions and other activities happening within team channels
  5. Threads : A series of messages creates a thread. Users replying to a message should select the Reply option instead of creating a new conversation and thread.

This article provides you an overview to get started with the Microsoft Teams connector in Peliqan. Please contact support if you have any additional questions or remarks.

Discovering Team ID

  1. Open Microsoft Teams App.
  2. On the left toolbar, click on Teams icon.
  3. Once inside Teams, click on 3-dots at the right of the Team name and a pop-up menu will appear
  4. image
  5. On pop-up menu, click on “Get link to Team”.
  6. A pop-up window will appear on the screen with Team URL. On the URL, copy value of groupId
  7. image

Discovering Channel ID

  1. Open Microsoft Teams App.
  2. On the left toolbar, click on Teams icon. Inside teams, select any Channel.
  3. On right side of Channel Name, click on 3-dots and a pop-up menu will appear. On pop-up menu click in “Get Link to Channel”
  4. image
  5. A pop-up window will appear on the screen with Channel URL. On the URL, copy URL encoded Channel ID placed between channel and general in URL.

Sample URL :{team_id}&tenantId={tenant_id}

Discovering Chat ID

There are many ways to get Chat ID of a conversation, either Group Chat or one-to-one chat.

  1. Using Microsoft Teams Web :
    1. Open Microsoft Teams on browser. Use :
    2. Open the desired chat. In the URL, one can find the chat ID after “conversations”
    3. image

  1. Using Peliqan Data Activation functions to get desired Chat providing the other user(for one-to-one chat) or Display name( for group chats).
  2. This method is detailed under Microsoft Teams Data Activation( see below)

Microsoft Teams Data Pipeline

Peliqan connects to Microsoft Teams performing OAuth flow. Peliqan App is verified by microsoft and signs in on behalf of the user once Authorization flow is completed.



  1. Start the OAuth Connection flow by clicking on ‘Connect Microsoft Teams Writeback’.
  2. If you are signed in with multiple Microsoft accounts on browser, select the Microsoft Teams account and authenticate yourself by entering credentials.
  3. Allow Peliqan app to login on your behalf and access Microsoft Teams Data.
  4. Once OAuth flow is completed, you will be redirected back to Peliqan to perform Writeback operations.

Microsoft Teams Data Activation

Peliqan provides lot of data activation function which enables users to communicate with Microsoft Teams application through Python Scripts.

Supposably, we have already a team account and we fetch Team_Id using the method mentioned above.

Creating a Channel

“Add Channel” data activation method helps creating a channel. It requires a team and compulsory details for the channel.


Retrieving all Channels.

“Get Channels” data activation method helps fetching all channels under the team. It requires a team ID.

It returns list of channel objects present.


Sending message to a channel

“Add Channel Message” data activation method is used to send a message to a chanel. It requires Team_Id, desired Channel ID and message content.


Get all users under the tenant

“Get Users” function gets you all the users under the same tenant or organisatons.

Results from these functions are useful while creating a chat, fetching chat id or sending message into a chat.


Creating a Chat

Chat can be one-to-one or in a group. To add people in a chat this function requires user_id of intended participants.

“Add Chat” function required user ids of members in user.binddata and type of chat( blue boxes). One can also decide the membership type of the user( red box) . Additionally, one can define multiple roles for a user like owner or guest.( green boxes)


One-on-One Chat

‘chatType’ for one-to-one chat has ‘chatType’ as ‘oneOnOne’. Point to remember, one-to-one chat can have at most 2 members


Group Chat

For Group chat, chatType changes to “group” and a group must have at least 2 members.

Sending message to a chat

“Add Chat Message” data activation function enables you to send message to a teams chat either oneOnOne or Group with Chat ID being provided.

Peliqan provides two ways to find finding the chat ID which are :

  1. Getting list of all the chats and fetching the required chat ID
    1. “Get Chats” function provides a list of chats having chat object where each object contains chat metadata which includes Chat displayName, Chat ID, last message sent, type of chat, members involved,etc.
    2. Required chat ID can be pulled from the list.
    3. image

    4. Now from the list, get the desired Chat ID and send a message using “Add Chat Message” activation function.
    5. image

  2. Finding one specific Chat based on details provided by user and sending message.
  3. This method is available for chatType as one-to-one where we provide other member displayName and in response we get chatDetails.


    “FindOne Chat” function is used which requires displayName to be passed as argument.DisplayName:


    Now pulling chat_id from the same response we pass it to “Add Chat Message” method to send a message to the chat.