Introduction
Microsoft 365 Teams API allows the users to create, read and edit Microsoft teams & channels within Teams with the right access set to their Microsoft 365 accounts. The Goal of this connector is to integrate Tulip with M365 using Microsoft’s Graph API(v1.0) using HTTP Connectors & provide our customers with an out-of-box connector that can be imported into their instance.
Purpose
We are going to highlight different connector functions that can be built by doing HTTP calls to Microsoft’s Graph API(v1.0) to interact with the M365 Teams to showcase various read and write actions on the teams that could be leveraged for various use cases.
API Doc
Microsoft Graph API Documentation
Pre-Requisites
Create an account on Microsoft 365 & configure the OAuth 2.0 credentials in Azure Active Directory.
2.Register API with the required scopes in the Azure portal.
Tulip Connection Details
The following information would need to be configured on Tulip’s
Connectors.
Running On: Cloud Connector Host
Host: graph.microsoft.com
Port:443
TLS: Yes
OAuth 2: Authentication will be carried forward to all
the Connector Functions
Connector Functions
Get all Teams
Purpose
This connector will fetch all the teams a user is a part of using their Microsoft teams account.
Endpoint
HTTP GET call to the endpoint - https://graph.micrsoft.com:443/v1.0/me/joinedTeams
Required Input
No Inputs required
Required Output Extractor
teamID: Unique identifier of the Team which will be used to carry out the other tasks.
teamName: The display name of the Team.
teamDescription: The description of the Team.
Get all Channels of a Team
Purpose
This connector will fetch all the channels of a team by passing the teamID as input.
Endpoint
HTTP GET call to the endpoint - https://graph.microsoft.com:443/v1.0/teams/{teamID}/channels
Required Input
The following are the URL parameters that are to be passed
Team Id
Required Output Extractor
channelId: Unique identifier of the Channel which will be used to carry out the other tasks.
channelName: The display name of the Channel.
channelDescription: The description of the Channel.
Create a New Channel
Purpose
Users can pass a Team ID, Channel Name and Channel Description as input & Tulip will create a new channel with channel name provided. The response of the API will be the metadata and various properties of the channel. This can be further used to fetch and Update data from the channel.
Information is pulled from Microsoft Graph V1.0 API can then be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions.
Endpoint
HTTP POST call to the endpoint - https://graph.microsoft.com:443/v1.0/teams/{teamID}/channels
Required Input
The following are the parameters that are sent as the Request Body
Team ID
Channel Name
Channel Description
Required Output Extractor
channelId: Unique identifier of the Channel which will be used to carry out the other tasks.
channelName:The display name of the Channel.
channelDescription:The description of the Channel.
Update Channel Properties
Purpose
Users can pass a Team ID, Channel ID, New Channel Name, and New Channel Description as input & Tulip will update a new Channel with the new channel name and description provided. The response of the API will be the metadata and various properties of the channel. This can be further used to fetch and Update data from the channel.
Information is pulled from Microsoft Graph V1.0 API can then be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions.
Endpoint
HTTP PATCH call to the endpoint https://graph.microsoft.com:443/v1.0/teams/{teamID}/channels/{channelID}
Required Input
The following are the parameters that are sent as part of URL and/or Request Body
Team ID
Channel ID
Channel Name
Channel Description
Required Output Extractor
We don’t require any output extractor.
Send a Message to a Channel
Purpose
Users can pass a Team ID, Channel ID, Subject, and Message Content as input & Tulip will send a message with message content provided.
Endpoint
HTTP POST call to the endpoint - https://graph.microsoft.com:443/v1.0/me/teams/{teamID}/channels/{channelID}/messages
Required Input
The following are the parameters that are sent as part of URL and/or Request Body
Team ID
Channel ID
Subject
Message Content
Required Output Extractor
We don’t require any output extractor.
Get all Messages of a specific Channel
Purpose
This connector will fetch all the messages from a specific channel.
Endpoint
HTTP GET call to the endpoint - https://graph.microsoft.com:443/v1.0/teams/{teamID}/channels/{channelID}/messages
Required Input
The following are the URL parameters that are to be passed.
Team ID
Channel ID
Required Output Extractor
messageId: Unique identifier of the Message which will be used to carry out the other tasks.
messageContent: The content of the Message.
messageFrom: The display name of the Sender.
Reply to a Message
Purpose
Users can pass a Team ID, Channel ID, Subject, and Message Content as an input to reply to a message & Tulip will send a reply with message content provided.
Endpoint
HTTP POST call to the endpoint - https://graph.microsoft.com:443/v1.0/me/teams/{teamID}/channels/{channelID}/messages/{messageID}/replies
Required Input
The following are the parameters that are sent as part of URL and/or Request Body
Team ID
Channel ID
Message ID
Message Content
Required Output Extractor
We don’t require any output extractor.
Delete a Channel
Purpose
Users can pass a Team ID and Channel ID as input & Tulip will delete the specific channel with the provided inputs.
Endpoint
HTTP DELETE call to the endpoint -https://graph.microsoft.com:443/v1.0/teams/{teamID}/channels/{channelID}
Required Input
The following are the URL parameters that are to be passed
Team ID
Channel ID
Required Output Extractor
We don’t require any output extractor.
Get the list of Members for a team
Purpose
This connector will fetch all the members of a specific team.
Endpoint
HTTP GET call to the endpoint https://graph.microsoft.com:443/v1.0/teams/{teamID}/members
Required Input
The following are the URL parameters that are to be passed.
Team ID
Required Output Extractor
Member Id: Unique identifier of the Member.
Member Name: The display name of the Member.
Member EmailID: The email ID of the Member.
Member Role: The role of a member in the Team Channel.