Terminology
- Team: Teams are groups of people who connect and collaborate on work and other projects.
- 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.
- Chat: Chat lets you connect with others, stay up to date on projects, and express yourself. It helps directly reaching out to teammates or any external person directly. Chats can be One-On-One and Group Chats.
- Mentions: Users can use mentions to message and alert other users
- Feeds: The activity feed provides a summary of messages, replies, mentions and other activities happening within team channels
- 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.
Discovering Team ID
- Open Microsoft Teams App.
- On the left toolbar, click on Teams icon.
- Once inside Teams, click on 3-dots at the right of the Team name and a pop-up menu will appear
- On pop-up menu, click on “Get link to Team”.
- A pop-up window will appear on the screen with Team URL. On the URL, copy value of groupId
Discovering Channel ID
- Open Microsoft Teams App.
- On the left toolbar, click on Teams icon. Inside teams, select any Channel.
- 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”
- 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.
https://teams.microsoft.com/l/channel/19%3Ad9Mcx84nowbsPcSgbvJwx7wKE-onikns_xxxxxE1%40thread.tacv2/General?groupId=\{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:- Open Microsoft Teams on browser. Use : https://teams.microsoft.com
- Open the desired chat. In the URL, one can find the chat ID after “conversations”. This feature is only supported in Classic Teams(v1)
Connecting Microsoft Teams in Peliqan
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.Authentication
- Start the OAuth Connection flow by clicking on ‘Connect Microsoft Teams Writeback’.
- If you are signed in with multiple Microsoft accounts on browser, select the Microsoft Teams account and authenticate yourself by entering credentials.
- Allow Peliqan app to login on your behalf and access Microsoft Teams Data.
- 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 organisations. Results from these functions are useful while creating a chat, fetching chat id or sending message into a chat.Finding a Chat
Chat can be one-on-one (having two members) or group (with at least 2 members). Find One One-On-One Chat “Find OneonOne Chat” method is used to get one-on-one chat details by simply providing displayName of the other member. DisplayName of the user is unique and cannot be edited.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).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- “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.
- Required chat ID can be pulled from the list.
- Now from the list, get the desired Chat ID and send a message using “Add Chat Message” activation function.
<a></a> (Anchor) tag, please ensure “hyperlink reference” is not enclosed in quotes.
