Fortinet black logo

Microsoft Teams

Microsoft Teams v2.0.0

About the connector

Microsoft Teams is a chat-based workspace in Office 365 that provides global, remote, and dispersed teams with the ability to work together and share information using a common space. This connector facilitates automated operation related to teams.

This document provides information about the Microsoft Teams Connector, which facilitates automated interactions, with a Microsoft Teams server using FortiSOAR™ playbooks. Add the Microsoft Teams Connector as a step in FortiSOAR™ playbooks and perform automated operations with Microsoft Teams.

Version information

Connector Version: 2.0.0

FortiSOAR™ Version Tested on: 7.3.1-2105

Microsoft Teams Version Tested on: Microsoft Graph API v1.0

Authored By: Fortinet

Certified: Yes

Release Notes for version 2.0.0

Following enhancements have been made to the Microsoft Teams Connector in version 2.0.0:

  • This connector version is now certified.
  • Added Support to OAuth Authorization (using Delegate and Application permissions).
  • Added following new operation and playbooks:
    • Get All Users
    • Create Meeting
    • Get Meeting
    • Update Meeting
    • Delete Meeting
    • Send Chat Message
  • Added new parameters in some operations as follows:
    • User ID parameter in Create Team operation.
    • Group Type parameter in Create Group operation.
    • Message Type parameter in Send Channel Message operation.
    • Custom Properties parameter in Get Groups, Get Group Owner, Get Group Members, Get Channel, Get Channel Messages, and Get Team operations.
  • Removed the parameter Owner ID from the Create Team operation:
  • Renamed following operations and playbook names:
    • Get Groups/Teams operation renamed to Get Groups.
    • Delete Group/Team operation renamed to Delete Group.
    • Get Users operation renamed to Get User.
    • Send Message operation renamed to Send Channel Message.
  • Output Schema Updated for following operations:
    • Get User
    • Update User
    • Delete User
    • Create Group
    • Get Groups
    • Delete Group
    • Create Channel
    • Get Channel
    • Send Channel Message
    • Messages Mention
    • List User Joined Teams
    • Get Team
    • Update Team

Getting Access Tokens

You can get authentication tokens to access the graph APIs using two methods:

Getting Access Tokens using the On behalf of the User - Delegate Permission method

  1. Ensure that the required permissions are granted for the registration of the application. Select API Permissions > Add permission > Microsoft Graph > Delegated Permissions.
    NOTE: The API Permission that should be granted to the registered application is mentioned in the Minimum permissions required for the 'Delegate-type' permission table.
  2. The Redirect URL can be directed to any web application in which you want to receive responses from Azure AD. If you are unsure about what to set as a redirect URL, you can use https://localhost/myapp.
  3. Copy the following URL and replace the TENANT_ID, CLIENT_ID, and REDIRECT_URI with your tenant ID, client ID, and the following redirect URL:
    https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/authorize? client_id=CLIENT_ID&response_type=code&redirect_uri=REDIRECTION_URL&response_mode=query&scope=https://graph.microsoft.com/.default,offline_access
  4. Enter the above link with the replaced values and you will be prompted to grant permissions for your Azure Service Management. You will be automatically redirected to a link with the following structure: REDIRECT_URI?code=AUTH_CODE&session_state=SESSION_STATE
  5. Copy the AUTH_CODE (without the "code=" prefix) and paste it in your instance configuration in the Authorization Code parameter.
  6. Enter your client ID in the Client ID parameter field.
  7. Enter your client secret in the Client Secret parameter field.
  8. Enter your tenant ID in the Tenant ID parameter field.
  9. Enter your redirect URL in the Redirect URL parameter field. By default, it is set to https://localhost/myapp.

Getting Access Tokens Without a User - Application Permission method

  • Ensure that the required permissions are granted for the registration of the application. Select API Permissions > Add permission > Microsoft Graph > Delegated Permissions.
    NOTE: The API Permission that should be granted to the registered application is mentioned in the Minimum permissions required for the 'Application Type' permission table.
    • User.Read.All
    • User.ReadWrite.All
    • GroupMember.Read.All
    • GroupMember.ReadWrite.All
    • Group.ReadWrite.All
    • Group.Read.All
    • AuditLog.Read.All
    • Directory.Read.All
    • Directory.ReadWrite.All
    • User.ManageIdentities.All of type Application.
  • Enter your client ID in the Client ID parameter field.
  • Enter your client secret in the Client Secret parameter field.
  • Enter your tenant ID in the Tenant ID parameter field.

Minimum Permissions Table

ApplicationPermissions DelegatePermissions
Directory.ReadWrite.All Directory.ReadWrite.All
Directory.Read.All Directory.Read.All
User.Read.All User.Read.All
User.ReadWrite.All User.ReadWrite.All
User.ManageIdentities.All User.ManageIdentities.All
User.EnableDisableAccount.All User.EnableDisableAccount.All
- User.ReadBasic.All
- User.Read
- User.ReadWrite
- User.ReadBasic.All
Group.ReadWrite.All Group.ReadWrite.All
GroupMember.Read.All GroupMember.Read.All
Group.Read.All Group.Read.All
GroupMember.ReadWrite.All GroupMember.ReadWrite.All
Group.Create -
Channel.Create Channel.Create
Channel.ReadBasic.All Channel.ReadBasic.All
ChannelSettings.Read.All ChannelSettings.Read.All
ChannelSettings.ReadWrite.All ChannelSettings.ReadWrite.All
ChannelMessage.Read.All ChannelMessage.Read.All
- ChannelMessage.Send
Channel.Create.Group -
ChannelSettings.Read.Group -
ChannelSettings.ReadWrite.Group -
ChannelMessage.Read.Group -
Chat.Read Chat.Read
Chat.Create Chat.Create
- Chat.ReadWrite
- ChatMessage.Send
Team.Create Team.Create
Team.ReadBasic.All Team.ReadBasic.All
TeamSettings.Read.All TeamSettings.Read.All
TeamSettings.ReadWrite.All TeamSettings.ReadWrite.All
Teamwork.Migrate.All -
TeamSettings.Read.Group -
TeamSettings.ReadWrite.Group -
OnlineMeetingArtifact.Read.All OnlineMeetingArtifact.Read.All
OnlineMeetings.ReadWrite.All -
OnlineMeetings.Read.All -
- OnlineMeetings.ReadWrite
- OnlineMeetings.Read

Installing the connector

Use the Content Hub to install the connector. For the detailed procedure to install a connector, click here.

You can also use the yum command as a root user to install the connector:

yum install cyops-connector-microsoft-teams

Prerequisites to configuring the connector

  • You must have the URL of Microsoft Teams server to connect and perform automated operations and credentials to access that server.
  • The FortiSOAR™ server should have outbound connectivity to port 443 on the Microsoft Teams server.

Minimum Permissions Required

  • Not applicable

Configuring the connector

For the procedure to configure a connector, click here

Configuration parameters

In FortiSOAR™, on the Connectors page, click the Microsoft Teams connector row (if you are in the Grid view on the Connectors page) and in the Configurations tab enter the required configuration details:

Parameter Description
Get Access Token Select the method used to get authentication tokens for accessing the security graph APIs. You can choose from the following options:
  • On behalf of User – Delegate Permission
  • Without a User – Application Permission
For more information, see the Getting Access Tokens section.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
By default, this option is set to True.

Actions supported by the connector

The following automated operations can be included in playbooks and you can also use the annotations to access operations:

Function Description Annotation and Category
Create User Creates a new user in Microsoft Teams based on the display name, mail nickname, password, and other input parameters you have specified. create_user
Investigation
Get All Users Retrieves a list of users from Microsoft Teams based on the query for filtering users that you have specified. list_users
Investigation
Get User Retrieves details for users from Microsoft Teams based on the user ID or the user principal name you have specified. get_users
Investigation
Update User Updates the details of an existing Microsoft Teams user based on the user ID or the user principal name, display name, and other input parameters you have specified. update_user
Investigation
Delete User Deletes an existing Microsoft Teams user based on the user ID or the user principal name you have specified.
IMPORTANT: Once a user is deleted, the resources of the user are moved to a temporary container from which they can be restored within 30 days after which, they are permanently deleted.
delete_user
Investigation
Create Group Creates a new group in Microsoft Teams based on the display name, mail nickname, and other input parameters you have specified.
NOTE: You can create an Office 365 Group (Unified Group) or a Security Group.
create_group
Investigation
Get Groups Retrieves details for groups from Microsoft Teams based on the group ID you have specified.
NOTE: If no parameter is specified, then this operation returns details of all the groups.
get_groups
Investigation
Delete Group Deletes an existing Microsoft Teams group based on the group ID you have specified.
IMPORTANT:: Once a group is deleted, the Office 365 groups are moved to a temporary container from which they can be restored within 30 days after which, they are permanently deleted.
delete_group
Investigation
Add Group Owner Adds a user as an owner of a specific Office 365 or Security Group in Microsoft Teams based on the group ID and user ID you have specified. add_owner
Investigation
Get Group Owner Retrieves a list of owners of a specified group from Microsoft Teams based on the group ID you have specified get_group_owner
Investigation
Remove Group Owner Removes the specified owner from the specified group in Microsoft Teams based on the group ID and owner ID you have specified. remove_group_owner
Investigation
Add Group Member Adds a user as a member of a specific Office 365 or Security Group in Microsoft Teams based on the group ID and user ID you have specified. add_member
Investigation
Get Group Members Retrieves a list of the direct members of a group from Microsoft Teams based on the group ID and user ID you have specified. A group can have users, contacts, devices, service principals, and other groups as its members. get_group_member
Investigation
Remove Group Member Removes the specified user from the specified group in Microsoft Teams based on the group ID and user ID you have specified. remove_group_member
Investigation
Create Channel Creates a new channel in Microsoft Teams based on the team or group name, channel name, membership type, and other input parameters you have specified. create_channel
Investigation
Get Channel Retrieves information for a specified channel from Microsoft Teams based on the team or group ID and channel name you have specified. get_channel
Investigation
Get Channel Messages Retrieves a list of messages (without the replies) from a specific channel of a specific group in Microsoft Teams based on the team or group ID, channel ID, and optionally the message ID you have specified.
NOTE: If you specify the message ID then details of the specific message will be retrieved from Microsoft Teams.
get_channel_messages
Investigation
Send Channel Message Sends chat messages to a specified channel in the specified group in Microsoft Teams based on the team or group ID, channel ID, and message you have specified. send_message
Investigation
Reply Message Replies to a specified chat message of a specified channel in the specified group in Microsoft Teams based on the group ID, channel ID, message ID, and message you have specified. reply_messages
Investigation
Messages Mention Mentions a specific user to a specific message and channel in Microsoft Teams based on the team or group ID, channel ID, user ID, user display name, and message you have specified. messages_mention
Investigation
Create Team Creates a new team in Microsoft Teams based on the display name, description, and other input parameters you have specified. create_team
Investigation
List User Joined Teams Retrieves the teams in which the specified user is a direct member from Microsoft Teams based on the user ID you have specified. list_user_joined_teams
Investigation
Get Team Retrieves detailed information about a team from Microsoft Teams based on the team or group ID you have specified. get_team
Investigation
Update Team Updates the properties for an existing team in Microsoft Teams based on the team ID and properties you have specified. update_team
Investigation
Archive Team Archives the specified team in Microsoft Teams based on the team ID you have specified.
NOTE: When a team is archived, users can no longer send or like messages on any channel that is part of the archived team.
archive_team
Investigation
Unarchive Team Restores an archived team in Microsoft Teams based on the team ID you have specified. Unarchiving a team restores the user's ability to send messages to the team and to edit the properties of the team. unarchive_team
Investigation
Clone Team Creates a copy of a specified team in Microsoft Teams based on the team ID, display name, mail nick name, and other input parameters you have specified. This operation also creates a copy of the team's corresponding group. clone_team
Investigation
Create Meeting Creates a new meeting in Microsoft Teams based on the user ID, subject, and other input parameters you have specified. create_meeting
Investigation
Get Meeting Retrieves details for meeting from Microsoft Teams based on the user ID, meeting ID, and other input parameters you have specified. get_meeting
Investigation
Update Meeting Updates the properties for an existing meeting in Microsoft Teams based on the user ID, meeting ID and other input parameters you have specified. update_meeting
Investigation
Delete Meeting Deletes an existing meeting in Microsoft Teams based on the user ID and meeting ID you have specified. delete_meeting
Investigation
Send Chat Message Sends a new chatMessage in the specified chat. Note: This action is not supported for Application Permission. send_chat
Investigation

operation: Create User

Input parameters

Parameter Description
Display Name Specify the name to display in the address book for the user that you want to create in Microsoft Teams.
NOTE: Maximum length for the user's display name is 256 characters.
Account Enabled Select this checkbox, i.e, set it to "true", to enable the newly created account in Microsoft Teams. By default, this is set as "false".
Mail Nick Name Specify the mail alias for the user that you want to create in Microsoft Teams.
User Principal Name Specify the principal name of the user, for example, someuser@example.com, that you want to create in Microsoft Teams.
Password Specify the password to be set for the user that you want to create in Microsoft Teams. You must set this password when you are creating a user in Microsoft Teams. Passwords can be updated. However, the user will be required to change the password on their next login. The password must satisfy minimum requirements as specified by the "passwordPolicies" parameters of the user. By default, a strong password is required.
Force Change Password Next SignIn Select this checkbox, i.e, set it to "true", to force users to change their password when they sign in to Microsoft Teams the next time. Once the user has changed their password, this parameter automatically resets to false. By default, this is set as "false".
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to specify for the user you want to create in Microsoft Team. The additional properties signify additional fields associated with the user.

Output

The output contains the following populated JSON schema:
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"displayName": "",
"mobilePhone": "",
"@odata.context": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}

operation: Get All Users

Input parameters

Parameter Description
Filter Query Specify the filter query based on which you want to retrieve groups. Refer to Azure Filter Query Parameters for information on the filter query syntax.
Select Query Specify the $select query to retrieve groups from Microsoft Teams. The OData's Select query is supported on fields such as id, userPrincipalName, displayName, etc. Refer to OData system query options for more information.
Search Query Specify the search query to retrieve user details from Azure Active Directory. The OData's Search query is supported on fields such as id, userPrincipalName, displayName, etc. Refer to OData system query options for more information.
Order By (Optional) Specify the order in which you want to sort the results retrieved from Microsoft Teams. You can specify asc or desc.
By default, this is set to asc.
Number of Users to Fetch (Optional) Specify the maximum number of users that this operation should return from Microsoft Teams.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to specify for the user you want to create in Microsoft Team. The additional properties signify additional fields associated with the user.

Output

The output contains the following populated JSON schema:
{
"data": {
"value": [
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"displayName": "",
"mobilePhone": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}
],
"@odata.context": ""
}
}

operation: Get User

Input parameters

Parameter Description
Based On Select the parameter using which you want to retrieve details for a user from Microsoft Teams. You can choose from the following options:
  • User ID: Specify the ID of the user whose details you want to retrieve from Microsoft Teams, in the User ID field.
  • User Principal Name: Specify the User Principal Name of the user whose details you want to retrieve from Microsoft Teams, in the User Principal Name field. If this parameter is not specified then it returns all user details.

Output

The output contains the following populated JSON schema:
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"displayName": "",
"mobilePhone": "",
"@odata.context": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}

operation: Update User

Input parameters

Parameter Description
Based On Select the parameter using which you want to update details of a user in Microsoft Teams. You can choose from the following options:
  • User ID: Specify the ID of the user whose details you want to update in the User ID field.
  • User Principal Name: Specify the User Principal Name of the user whose details you want to update in the User Principal Name field.
Display Name Specify the display name that you want to update in the address book for the Microsoft Teams user.
Given Name Specify the given name (first name) that you want to update for the Microsoft Teams user.
Surname Specify the surname that you want to update for the Microsoft Teams user.
Job Title Specify the job title that you want to update for the Microsoft Teams user.
Office Location Specify the office location, i.e., the user's place of business that you want to update for the Microsoft Teams user.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to update for the Microsoft Teams user. The additional properties signify additional fields associated with the user.

Output

The output contains the following populated JSON schema:
{
"message": ""
}

operation: Delete User

Input parameters

Parameter Description
Based On Select the parameter using which you want to delete the user in Microsoft Teams. You can choose from the following options:
  • User ID: Specify the ID of the user to delete in the User ID field.
  • User Principal Name: Specify the User Principal Name of the user whose details you want to delete in the User Principal Name field.

Output

The output contains the following populated JSON schema:
{
"message": ""
}

operation: Create Group

Input parameters

Parameter Description
Display Name Specify the name to display in the address book for the group that you want to create in Microsoft Teams.
NOTE: Maximum length for the group's display name is 256 characters.
Mail Nickname Specify the mail alias for the group that you want to create in Microsoft Teams.
NOTE: Spaces are not allowed in the mail alias for the group.
Email Enabled Select this checkbox for mail-enabled groups.
Security Enabled Select this checkbox only for security-enabled groups, including Office 365 groups.
Group Type Specify the group type. If the collection contains Unified, the group is a Microsoft 365 group; otherwise, it's either a security group or distribution group. For details, see: https://learn.microsoft.com/en-us/graph/api/resources/groups-overview?view=graph-rest-1.0#group-types-in-azure-ad-and-microsoft-graph
Description Specify a Description of the group that you want to create in Microsoft Teams.
Visibility Specify the visibility to be set for the Office 365 group that you want to create in Microsoft Teams. You can choose from the following options: Private, Public, HiddenMembership, or "empty" (which is interpreted as Public).
Custom Properties Specify the additional properties, in JSON format, that you want to specify for the group you want to create in Microsoft Team. The additional properties signify additional fields associated with the group.

Output

The output contains the following populated JSON schema:
{
"id": "",
"mail": "",
"theme": "",
"groupTypes": [],
"visibility": "",
"description": "",
"displayName": "",
"mailEnabled": "",
"mailNickname": "",
"@odata.context": "",
"classification": "",
"membershipRule": "",
"proxyAddresses": [],
"createdDateTime": "",
"creationOptions": [],
"deletedDateTime": "",
"renewedDateTime": "",
"securityEnabled": "",
"preferredLanguage": "",
"expirationDateTime": "",
"isAssignableToRole": "",
"securityIdentifier": "",
"onPremisesDomainName": "",
"onPremisesNetBiosName": "",
"onPremisesSyncEnabled": "",
"preferredDataLocation": "",
"resourceBehaviorOptions": [],
"onPremisesSamAccountName": "",
"onPremisesLastSyncDateTime": "",
"resourceProvisioningOptions": [],
"onPremisesProvisioningErrors": [],
"onPremisesSecurityIdentifier": "",
"membershipRuleProcessingState": ""
}

operation: Get Groups

Input parameters

Parameter Description
Group ID Specify the ID of the group whose details you want to retrieve from Microsoft Teams.
NOTE: If you do not specify this parameter, then details of all the groups are returned.
Custom Properties Specify the additional properties, in the JSON format, that you want to specify for the group you want to create in Microsoft Team. The additional properties signify additional fields associated with the group.

Output

The output contains the following populated JSON schema:

Output schema when the "Group ID" is not specified:
{
"id": "",
"mail": "",
"theme": "",
"groupTypes": [],
"visibility": "",
"description": "",
"displayName": "",
"mailEnabled": "",
"mailNickname": "",
"classification": "",
"membershipRule": "",
"proxyAddresses": [],
"createdDateTime": "",
"creationOptions": [],
"deletedDateTime": "",
"renewedDateTime": "",
"securityEnabled": "",
"preferredLanguage": "",
"expirationDateTime": "",
"isAssignableToRole": "",
"securityIdentifier": "",
"onPremisesDomainName": "",
"onPremisesNetBiosName": "",
"onPremisesSyncEnabled": "",
"preferredDataLocation": "",
"resourceBehaviorOptions": [],
"onPremisesSamAccountName": "",
"onPremisesLastSyncDateTime": "",
"resourceProvisioningOptions": [],
"onPremisesProvisioningErrors": [],
"onPremisesSecurityIdentifier": "",
"membershipRuleProcessingState": ""
}

Output schema when the "Group ID" is not specified:
{
"data": {
"value": [
{
"id": "",
"mail": "",
"theme": "",
"groupTypes": [],
"visibility": "",
"description": "",
"displayName": "",
"mailEnabled": "",
"mailNickname": "",
"classification": "",
"membershipRule": "",
"proxyAddresses": [],
"createdDateTime": "",
"creationOptions": [],
"deletedDateTime": "",
"renewedDateTime": "",
"securityEnabled": "",
"preferredLanguage": "",
"expirationDateTime": "",
"isAssignableToRole": "",
"securityIdentifier": "",
"onPremisesDomainName": "",
"onPremisesNetBiosName": "",
"onPremisesSyncEnabled": "",
"preferredDataLocation": "",
"resourceBehaviorOptions": [],
"onPremisesSamAccountName": "",
"onPremisesLastSyncDateTime": "",
"resourceProvisioningOptions": [],
"onPremisesProvisioningErrors": [],
"onPremisesSecurityIdentifier": "",
"membershipRuleProcessingState": ""
}
],
"@odata.context": ""
}
}

operation: Delete Group

Input parameters

Parameter Description
Group ID Specify the ID of the group that you want to delete from Microsoft Teams.
NOTE: Every team is associated with a group and the group has the same ID as the team.

Output

The output contains the following populated JSON schema:
{
"message": ""
}

operation: Add Group Owner

Input parameters

Parameter Description
Group ID Specify the ID of the group in Microsoft Teams to which you want to add the specific user as a group owner.
User ID Specify the ID of the user who you want to add as the group owner of the specified group in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"result": {
"user_id": "",
"group_id": ""
},
"status": "",
"message": ""
}

operation: Get Group Owner

Input parameters

Parameter Description
Group ID Specify the ID of the group whose group owner details you want to retrieve from Microsoft Teams.
Custom Properties Specify the additional properties, in the JSON format, that you want to specify for the group you want to create in Microsoft Team. The additional properties signify additional fields associated with the group.

Output

The output contains the following populated JSON schema:
{
"data": {
"value": [
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"@odata.type": "",
"displayName": "",
"mobilePhone": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}
],
"@odata.context": ""
}
}

operation: Remove Group Owner

Input parameters

Parameter Description
Group ID Specify the ID of the group in Microsoft Teams from which you want to remove the specific user as a group owner.
Owner ID Specify the ID of the owner who you want to remove as the group owner of the specified group in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"result": {
"user_id": "",
"group_id": ""
},
"status": "",
"message": ""
}

operation: Add Group Member

Input parameters

Parameter Description
Group ID Specify the ID of the group in Microsoft Teams to which you want to add the specific user as a member.
User ID Specify the ID of the user who you want to add as a member of the specified group in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"result": {
"owner_id": "",
"group_id": ""
},
"status": "",
"message": ""
}

operation: Get Group Members

Input parameters

Parameter Description
Group ID Specify the ID of the group whose direct members you want to retrieve from Microsoft Teams.
User ID Specify the ID of the member belonging to the specified group whose details you want to retrieve from Microsoft Teams.
Custom Properties Specify the additional properties, in the JSON format, that you want to specify for the group you want to create in Microsoft Team. The additional properties signify additional fields associated with the group.

Output

The output contains the following populated JSON schema:

Output schema when the "User ID" is not specified:
{
"@odata.context": "",
"@odata.type": "",
"id": "",
"businessPhones": [],
"displayName": "",
"givenName": "",
"jobTitle": "",
"mail": "",
"mobilePhone": "",
"officeLocation": "",
"preferredLanguage": "",
"surname": "",
"userPrincipalName": ""
}

Output schema when the "User ID" is not specified:
{
"data": {
"value": [
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"@odata.type": "",
"displayName": "",
"mobilePhone": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}
],
"@odata.context": ""
}
}

operation: Remove Group Member

Input parameters

Parameter Description
Group ID Specify the ID of the group which you want to remove from member of that group
User ID Specify the ID of the user who you want to remove as the group member of the specified group in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"result": {
"user_id": "",
"group_id": ""
},
"status": "",
"message": ""
}

operation: Create Channel

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group in that you want to create a new channel in Microsoft Teams. Note: Every team is associated with a group and the group has the same ID as the team.
Channel Name Specify the name of the channel that you want to create in Microsoft Teams.
Description Specify the description of the channel that you want to create in Microsoft Teams.
Membership Type Select the type of membership that would be allowed for the channel that you want to create in Microsoft Teams.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to specify for the channel you want to create in Microsoft Team. The additional properties signify additional fields associated with the channel.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"isFavoriteByDefault": "",
"email": "",
"webUrl": "",
"membershipType": ""
}

operation: Get Channel

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group that contains the channel whose information you want to retrieve from Microsoft Teams. Note: Every team is associated with a group and the group has the same ID as the team.
Channel ID Specify the ID of the channel whose information you want to retrieve from Microsoft Teams.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to specify for the channel you want to create in Microsoft Team. The additional properties signify additional fields associated with the channel.

Output

The output contains the following populated JSON schema:

Output schema when the "Channel ID" is not specified:
{
"value": [
{
"@odata.context": "",
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"isFavoriteByDefault": "",
"email": "",
"tenantId": "",
"webUrl": "",
"membershipType": ""
}
]
}

Output schema when the "Channel ID" is not specified:
{
"@odata.context": "",
"@odata.count": "",
"value": [
{
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"isFavoriteByDefault": "",
"email": "",
"tenantId": "",
"webUrl": "",
"membershipType": ""
}
]
}

operation: Get Channel Messages

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group in Microsoft Teams from which you want to retrieve messages from the specified channel. Note: Every team is associated with a group and the group has the same ID as the team.
Channel ID Specify the ID of the channel in Microsoft Teams from which you retrieve messages.
Message ID Specify the ID of the message whose details you want to retrieve from Microsoft Teams.

Output

The output contains the following populated JSON schema:

Output schema when the "Message ID" is not specified:
{
"@odata.context": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": "",
"tenantId": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"channelIdentity": {
"teamId": "",
"channelId": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}

Output schema when the "Message ID" is not specified:
{
"@odata.context": "",
"@odata.count": "",
"value": [
{
"id": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": "",
"tenantId": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"channelIdentity": {
"teamId": "",
"channelId": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}
]
}

operation: Send Channel Message

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group in Microsoft Teams to whom you want to send the group message.
NOTE: Every team is associated with a group and the group has the same ID as the team.
Channel ID Specify the ID of the channel in Microsoft Teams on which you want to send the message.
Message Type Select if you need to send a simple text message, html or an Adaptive card template.
  • Text: Specify the content of the group message that you want to send to a specific channel on a specific group or team in Microsoft Teams, in the Message field.
  • Adaptive Card Template: Specify adaptive cards schema in json format. For more info, refer https://adaptivecards.io/designer/.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"channelIdentity": {
"teamId": "",
"channelId": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}

operation: Reply Message

Input parameters

Parameter Description
Group ID Specify the ID of Group in Microsoft Teams whose conversation information you want to retrieve and to which you want to reply.
Channel ID Specify the ID of the channel in Microsoft Teams on which you want to send the reply to the specific message.
Message ID Specify the ID of the message in Microsoft Teams to which you want to send a reply.
Message Specify the content of the message that you want to send as a reply to the specified message.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"from": {
"application": "",
"device": "",
"conversation": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}

operation: Messages Mention

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group in Microsoft Teams in which you want to add a mention of the specific user.
NOTE: Every team is associated with a group and the group has the same ID as the team.
Channel ID Specify the ID of the channel in Microsoft Teams in which you want to add a mention of the specific user.
Message Specify the content of the message in which you want to add a mention of the specific user.
User ID Specify the ID of the user who you want to mention in the message.
User Display Name Specify the display name of the user who you want to mention in the message.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"channelIdentity": {
"teamId": "",
"channelId": ""
},
"attachments": [],
"mentions": [
{
"id": "",
"mentionText": "",
"mentioned": {
"application": "",
"device": "",
"conversation": "",
"tag": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
}
}
],
"reactions": []
}

operation: Create Team

Input parameters

Parameter Description
Display Name Specify the display name of the team that you want to create in Microsoft Teams. Note: Maximum length for the team's display name is 256 characters.
Description Specify the description of the team that you want to create in Microsoft Teams.
User ID Specify the ID of the user whose teams you want to create in Microsoft Teams.Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.
Bind Team Template Specify the name of the Bind Team Template for the team that you want to create in Microsoft Teams. Note: If you do not provide any value, the default template will be used.
Visibility Specify the visibility to be set for the Office 365 group that you want to create in Microsoft Teams. You can choose from the following options: Private, Public, HiddenMembership, or "empty" (which is interpreted as Public).
Custom Properties (Optional) Specify the additional properties, in the JSON format, provides other required fields of the team that you want to add properties of team

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": "",
"displayName": ""
}

operation: List User Joined Teams

Input parameters

Parameter Description
User ID Specify the ID of the user whose teams' membership information you want to retrieve from Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"@odata.count": "",
"value": [
{
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"internalId": "",
"classification": "",
"specialization": "",
"visibility": "",
"webUrl": "",
"isArchived": "",
"tenantId": "",
"isMembershipLimitedToOwners": "",
"memberSettings": "",
"guestSettings": "",
"messagingSettings": "",
"funSettings": "",
"discoverySettings": "",
"summary": ""
}
]
}

operation: Get Team

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group whose detailed information you want to retrieve from Microsoft Teams. from which you want to retrieve messages from the specified channel. Note: Every team is associated with a group and the group has the same ID as the team.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to create meeting in Microsoft Team.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"internalId": "",
"classification": "",
"specialization": "",
"visibility": "",
"webUrl": "",
"isArchived": "",
"isMembershipLimitedToOwners": "",
"discoverySettings": {
"showInTeamsSearchAndSuggestions": ""
},
"memberSettings": {
"allowCreateUpdateChannels": "",
"allowCreatePrivateChannels": "",
"allowDeleteChannels": "",
"allowAddRemoveApps": "",
"allowCreateUpdateRemoveTabs": "",
"allowCreateUpdateRemoveConnectors": ""
},
"guestSettings": {
"allowCreateUpdateChannels": "",
"allowDeleteChannels": ""
},
"messagingSettings": {
"allowUserEditMessages": "",
"allowUserDeleteMessages": "",
"allowOwnerDeleteMessages": "",
"allowTeamMentions": "",
"allowChannelMentions": ""
},
"funSettings": {
"allowGiphy": "",
"giphyContentRating": "",
"allowStickersAndMemes": "",
"allowCustomMemes": ""
},
"summary": {
"ownersCount": "",
"membersCount": "",
"guestsCount": ""
}
}

operation: Update Team

Input parameters

Parameter Description
Team ID Specify the ID of an existing team whose properties you want to update in Microsoft Teams.
Custom Properties Specify the additional properties, in the JSON format, that you want to specify for the team you want to update in Microsoft Team. The additional properties signify additional fields associated with the team.

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": "",
"result": {
"@odata.context": "",
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"internalId": "",
"classification": "",
"specialization": "",
"visibility": "",
"webUrl": "",
"isArchived": "",
"isMembershipLimitedToOwners": "",
"discoverySettings": {
"showInTeamsSearchAndSuggestions": ""
},
"memberSettings": {
"allowCreateUpdateChannels": "",
"allowCreatePrivateChannels": "",
"allowDeleteChannels": "",
"allowAddRemoveApps": "",
"allowCreateUpdateRemoveTabs": "",
"allowCreateUpdateRemoveConnectors": ""
},
"guestSettings": {
"allowCreateUpdateChannels": "",
"allowDeleteChannels": ""
},
"messagingSettings": {
"allowUserEditMessages": "",
"allowUserDeleteMessages": "",
"allowOwnerDeleteMessages": "",
"allowTeamMentions": "",
"allowChannelMentions": ""
},
"funSettings": {
"allowGiphy": "",
"giphyContentRating": "",
"allowStickersAndMemes": "",
"allowCustomMemes": ""
},
"summary": {
"ownersCount": "",
"membersCount": "",
"guestsCount": ""
}
}
}

operation: Archive Team

Input parameters

Parameter Description
Team ID Specify the ID of an existing team that you want to archive in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": ""
}

operation: Unarchive Team

Input parameters

Parameter Description
Team ID Specify the ID of an existing team whose archive you want to restore from Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": ""
}

operation: Clone Team

Input parameters

Parameter Description
Team ID Specify the ID of the existing team whose clone you want to create in Microsoft Teams.
Display Name Specify the mail alias for the team that you have cloned in Microsoft Team, which must be unique in the organization. This parameter must be specified when a group is created or cloned. If this parameter is not specified, it will be computed from the Display Name.
NOTE: Known issue: This parameter is currently being ignored.
Mail Nick Name Specify the mail alias for the group, unique in the organization. This property must be specified when a group is created. If this property is not specified, it will be computed from the displayName. Known issue: this property is currently ignored
Parts to clone Specify a CSV list of the parts of the team you want to clone. Legal parts are "apps", "tabs", "settings", "channels", and "members".
Visibility Specify the visibility to be set for the team that you want to clone in Microsoft Teams. You can choose from the following options: Private or Public (which is interpreted as Public).

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": ""
}

operation: Create Meeting

Input parameters

Parameter Description
Subject Specify a subject of the meeting that you want to create in Microsoft Teams.
User ID Specify the ID of the user who you want to create meeting in Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.
Start Time Specify a start time of the meeting that you want to create in Microsoft Teams.
End Time Specify an end time of the meeting that you want to create in Microsoft Teams.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to create meeting in Microsoft Team.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"creationDateTime": "",
"startDateTime": "",
"endDateTime": "",
"joinUrl": "",
"joinWebUrl": "",
"meetingCode": "",
"subject": "",
"isBroadcast": "",
"autoAdmittedUsers": "",
"outerMeetingAutoAdmittedUsers": "",
"isEntryExitAnnounced": "",
"allowedPresenters": "",
"allowMeetingChat": "",
"allowTeamworkReactions": "",
"allowAttendeeToEnableMic": "",
"allowAttendeeToEnableCamera": "",
"recordAutomatically": "",
"anonymizeIdentityForRoles": [],
"capabilities": [],
"videoTeleconferenceId": "",
"externalId": "",
"broadcastSettings": "",
"joinMeetingIdSettings": {
"isPasscodeRequired": "",
"joinMeetingId": "",
"passcode": ""
},
"audioConferencing": "",
"meetingInfo": "",
"participants": {
"organizer": {
"upn": "",
"role": "",
"identity": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"tenantId": "",
"identityProvider": ""
}
}
},
"attendees": []
},
"lobbyBypassSettings": {
"scope": "",
"isDialInBypassEnabled": ""
},
"chatInfo": {
"threadId": "",
"messageId": "",
"replyChainMessageId": ""
},
"joinInformation": {
"content": "",
"contentType": ""
}
}

operation: Get Meeting

Input parameters

Parameter Description
Meeting ID Specify the ID of the meeting whose details you want to retrieve from Microsoft Teams.
User ID Specify the ID of the user whose details you want to retrieve from Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to retrieve meeting properties from Microsoft Team.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"creationDateTime": "",
"startDateTime": "",
"endDateTime": "",
"joinUrl": "",
"joinWebUrl": "",
"meetingCode": "",
"subject": "",
"isBroadcast": "",
"autoAdmittedUsers": "",
"outerMeetingAutoAdmittedUsers": "",
"isEntryExitAnnounced": "",
"allowedPresenters": "",
"allowMeetingChat": "",
"allowTeamworkReactions": "",
"allowAttendeeToEnableMic": "",
"allowAttendeeToEnableCamera": "",
"recordAutomatically": "",
"anonymizeIdentityForRoles": [],
"capabilities": [],
"videoTeleconferenceId": "",
"externalId": "",
"broadcastSettings": "",
"joinMeetingIdSettings": {
"isPasscodeRequired": "",
"joinMeetingId": "",
"passcode": ""
},
"audioConferencing": "",
"meetingInfo": "",
"participants": {
"organizer": {
"upn": "",
"role": "",
"identity": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"tenantId": "",
"identityProvider": ""
}
}
},
"attendees": []
},
"lobbyBypassSettings": {
"scope": "",
"isDialInBypassEnabled": ""
},
"chatInfo": {
"threadId": "",
"messageId": "",
"replyChainMessageId": ""
},
"joinInformation": {
"content": "",
"contentType": ""
}
}

operation: Update Meeting

Input parameters

Parameter Description
Meeting ID Specify the ID of an existing meeting whose properties you want to update in Microsoft Teams.
User ID Specify the ID of an user whose associated meeting properties you want to update in Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.
Start Time Specify a start time of the meeting that you want to update in Microsoft Teams.
End Time Specify an end time of the meeting that you want to update in Microsoft Teams.
Subject Specify a subject of the meeting that you want to update in Microsoft Teams.
Enable Camera Specify if attendees can turn on their camera.
Enable Mic Specify if attendees can turn on their microphone.
Custom Properties Specify the additional properties, in the JSON format, that you want to meeting properties in update in Microsoft Team. The additional properties signify additional fields associated with the meeting.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"creationDateTime": "",
"startDateTime": "",
"endDateTime": "",
"joinUrl": "",
"joinWebUrl": "",
"meetingCode": "",
"subject": "",
"isBroadcast": "",
"autoAdmittedUsers": "",
"outerMeetingAutoAdmittedUsers": "",
"isEntryExitAnnounced": "",
"allowedPresenters": "",
"allowMeetingChat": "",
"allowTeamworkReactions": "",
"allowAttendeeToEnableMic": "",
"allowAttendeeToEnableCamera": "",
"recordAutomatically": "",
"anonymizeIdentityForRoles": [],
"capabilities": [],
"videoTeleconferenceId": "",
"externalId": "",
"broadcastSettings": "",
"joinMeetingIdSettings": {
"isPasscodeRequired": "",
"joinMeetingId": "",
"passcode": ""
},
"audioConferencing": "",
"meetingInfo": "",
"participants": {
"organizer": {
"upn": "",
"role": "",
"identity": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"tenantId": "",
"identityProvider": ""
}
}
},
"attendees": []
},
"lobbyBypassSettings": {
"scope": "",
"isDialInBypassEnabled": ""
},
"chatInfo": {
"threadId": "",
"messageId": "",
"replyChainMessageId": ""
},
"joinInformation": {
"content": "",
"contentType": ""
}
}

operation: Delete Meeting

Input parameters

Parameter Description
Meeting ID Specify the ID of an existing meeting which you want to delete in Microsoft Teams.
User ID Specify the ID of an user whose associated meeting you want to delete in Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.

Output

The output contains the following populated JSON schema:
{
"message": ""
}

operation: Send Chat Message

Input parameters

Parameter Description
Sender User Email Specify the email address of your account from which you want to send chat message.
Receiver User Email Specify the email address of receiver for to whom you want to send chat message.
Message Type Select if you need to send a simple text message or an HTML.
  • Text: Specify the content of the group message, in the Message field, that you want to send to a specific channel on a specific group or team in Microsoft Teams.
  • Card: Specify values in following fields:
    • Title: Specify the title of message card that you want to send to a specific channel on a specific group or team in Microsoft Teams.
    • Subtitle: Specify the title of message card that you want to send to a specific channel on a specific group or team in Microsoft Teams.
    • Body: Specify the message content with elements such as buttons.
    • Subject: Specify the subject of the message that you want to send to a specific channel on a specific group or team in Microsoft Teams.
    • Buttons: Specify the list of button objects to be added to the message.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"channelIdentity": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}

Included playbooks

The Sample - Microsoft Teams - 2.0.0 playbook collection comes bundled with the Microsoft Teams connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the Microsoft Teams connector.

  • Add Group Member
  • Add Group Owner
  • Archive Team
  • Clone Team
  • Create Channel
  • Create Group
  • Create Meeting
  • Create Team
  • Create User
  • Delete Group
  • Delete Meeting
  • Delete User
  • Get All Users
  • Get Channel
  • Get Channel Messages
  • Get Group Members
  • Get Group Owner
  • Get Groups
  • Get Meeting
  • Get Team
  • Get User
  • List User Joined Teams
  • Message Mention
  • Remove Group Member
  • Remove Group Owner
  • Reply Message
  • Send Channel Message
  • Send Chat Message
  • Unarchive Team
  • Update Meeting
  • Update Team
  • Update User

NOTE: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.

Previous
Next

About the connector

Microsoft Teams is a chat-based workspace in Office 365 that provides global, remote, and dispersed teams with the ability to work together and share information using a common space. This connector facilitates automated operation related to teams.

This document provides information about the Microsoft Teams Connector, which facilitates automated interactions, with a Microsoft Teams server using FortiSOAR™ playbooks. Add the Microsoft Teams Connector as a step in FortiSOAR™ playbooks and perform automated operations with Microsoft Teams.

Version information

Connector Version: 2.0.0

FortiSOAR™ Version Tested on: 7.3.1-2105

Microsoft Teams Version Tested on: Microsoft Graph API v1.0

Authored By: Fortinet

Certified: Yes

Release Notes for version 2.0.0

Following enhancements have been made to the Microsoft Teams Connector in version 2.0.0:

Getting Access Tokens

You can get authentication tokens to access the graph APIs using two methods:

Getting Access Tokens using the On behalf of the User - Delegate Permission method

  1. Ensure that the required permissions are granted for the registration of the application. Select API Permissions > Add permission > Microsoft Graph > Delegated Permissions.
    NOTE: The API Permission that should be granted to the registered application is mentioned in the Minimum permissions required for the 'Delegate-type' permission table.
  2. The Redirect URL can be directed to any web application in which you want to receive responses from Azure AD. If you are unsure about what to set as a redirect URL, you can use https://localhost/myapp.
  3. Copy the following URL and replace the TENANT_ID, CLIENT_ID, and REDIRECT_URI with your tenant ID, client ID, and the following redirect URL:
    https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/authorize? client_id=CLIENT_ID&response_type=code&redirect_uri=REDIRECTION_URL&response_mode=query&scope=https://graph.microsoft.com/.default,offline_access
  4. Enter the above link with the replaced values and you will be prompted to grant permissions for your Azure Service Management. You will be automatically redirected to a link with the following structure: REDIRECT_URI?code=AUTH_CODE&session_state=SESSION_STATE
  5. Copy the AUTH_CODE (without the "code=" prefix) and paste it in your instance configuration in the Authorization Code parameter.
  6. Enter your client ID in the Client ID parameter field.
  7. Enter your client secret in the Client Secret parameter field.
  8. Enter your tenant ID in the Tenant ID parameter field.
  9. Enter your redirect URL in the Redirect URL parameter field. By default, it is set to https://localhost/myapp.

Getting Access Tokens Without a User - Application Permission method

Minimum Permissions Table

ApplicationPermissions DelegatePermissions
Directory.ReadWrite.All Directory.ReadWrite.All
Directory.Read.All Directory.Read.All
User.Read.All User.Read.All
User.ReadWrite.All User.ReadWrite.All
User.ManageIdentities.All User.ManageIdentities.All
User.EnableDisableAccount.All User.EnableDisableAccount.All
- User.ReadBasic.All
- User.Read
- User.ReadWrite
- User.ReadBasic.All
Group.ReadWrite.All Group.ReadWrite.All
GroupMember.Read.All GroupMember.Read.All
Group.Read.All Group.Read.All
GroupMember.ReadWrite.All GroupMember.ReadWrite.All
Group.Create -
Channel.Create Channel.Create
Channel.ReadBasic.All Channel.ReadBasic.All
ChannelSettings.Read.All ChannelSettings.Read.All
ChannelSettings.ReadWrite.All ChannelSettings.ReadWrite.All
ChannelMessage.Read.All ChannelMessage.Read.All
- ChannelMessage.Send
Channel.Create.Group -
ChannelSettings.Read.Group -
ChannelSettings.ReadWrite.Group -
ChannelMessage.Read.Group -
Chat.Read Chat.Read
Chat.Create Chat.Create
- Chat.ReadWrite
- ChatMessage.Send
Team.Create Team.Create
Team.ReadBasic.All Team.ReadBasic.All
TeamSettings.Read.All TeamSettings.Read.All
TeamSettings.ReadWrite.All TeamSettings.ReadWrite.All
Teamwork.Migrate.All -
TeamSettings.Read.Group -
TeamSettings.ReadWrite.Group -
OnlineMeetingArtifact.Read.All OnlineMeetingArtifact.Read.All
OnlineMeetings.ReadWrite.All -
OnlineMeetings.Read.All -
- OnlineMeetings.ReadWrite
- OnlineMeetings.Read

Installing the connector

Use the Content Hub to install the connector. For the detailed procedure to install a connector, click here.

You can also use the yum command as a root user to install the connector:

yum install cyops-connector-microsoft-teams

Prerequisites to configuring the connector

Minimum Permissions Required

Configuring the connector

For the procedure to configure a connector, click here

Configuration parameters

In FortiSOAR™, on the Connectors page, click the Microsoft Teams connector row (if you are in the Grid view on the Connectors page) and in the Configurations tab enter the required configuration details:

Parameter Description
Get Access Token Select the method used to get authentication tokens for accessing the security graph APIs. You can choose from the following options:
  • On behalf of User – Delegate Permission
  • Without a User – Application Permission
For more information, see the Getting Access Tokens section.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
By default, this option is set to True.

Actions supported by the connector

The following automated operations can be included in playbooks and you can also use the annotations to access operations:

Function Description Annotation and Category
Create User Creates a new user in Microsoft Teams based on the display name, mail nickname, password, and other input parameters you have specified. create_user
Investigation
Get All Users Retrieves a list of users from Microsoft Teams based on the query for filtering users that you have specified. list_users
Investigation
Get User Retrieves details for users from Microsoft Teams based on the user ID or the user principal name you have specified. get_users
Investigation
Update User Updates the details of an existing Microsoft Teams user based on the user ID or the user principal name, display name, and other input parameters you have specified. update_user
Investigation
Delete User Deletes an existing Microsoft Teams user based on the user ID or the user principal name you have specified.
IMPORTANT: Once a user is deleted, the resources of the user are moved to a temporary container from which they can be restored within 30 days after which, they are permanently deleted.
delete_user
Investigation
Create Group Creates a new group in Microsoft Teams based on the display name, mail nickname, and other input parameters you have specified.
NOTE: You can create an Office 365 Group (Unified Group) or a Security Group.
create_group
Investigation
Get Groups Retrieves details for groups from Microsoft Teams based on the group ID you have specified.
NOTE: If no parameter is specified, then this operation returns details of all the groups.
get_groups
Investigation
Delete Group Deletes an existing Microsoft Teams group based on the group ID you have specified.
IMPORTANT:: Once a group is deleted, the Office 365 groups are moved to a temporary container from which they can be restored within 30 days after which, they are permanently deleted.
delete_group
Investigation
Add Group Owner Adds a user as an owner of a specific Office 365 or Security Group in Microsoft Teams based on the group ID and user ID you have specified. add_owner
Investigation
Get Group Owner Retrieves a list of owners of a specified group from Microsoft Teams based on the group ID you have specified get_group_owner
Investigation
Remove Group Owner Removes the specified owner from the specified group in Microsoft Teams based on the group ID and owner ID you have specified. remove_group_owner
Investigation
Add Group Member Adds a user as a member of a specific Office 365 or Security Group in Microsoft Teams based on the group ID and user ID you have specified. add_member
Investigation
Get Group Members Retrieves a list of the direct members of a group from Microsoft Teams based on the group ID and user ID you have specified. A group can have users, contacts, devices, service principals, and other groups as its members. get_group_member
Investigation
Remove Group Member Removes the specified user from the specified group in Microsoft Teams based on the group ID and user ID you have specified. remove_group_member
Investigation
Create Channel Creates a new channel in Microsoft Teams based on the team or group name, channel name, membership type, and other input parameters you have specified. create_channel
Investigation
Get Channel Retrieves information for a specified channel from Microsoft Teams based on the team or group ID and channel name you have specified. get_channel
Investigation
Get Channel Messages Retrieves a list of messages (without the replies) from a specific channel of a specific group in Microsoft Teams based on the team or group ID, channel ID, and optionally the message ID you have specified.
NOTE: If you specify the message ID then details of the specific message will be retrieved from Microsoft Teams.
get_channel_messages
Investigation
Send Channel Message Sends chat messages to a specified channel in the specified group in Microsoft Teams based on the team or group ID, channel ID, and message you have specified. send_message
Investigation
Reply Message Replies to a specified chat message of a specified channel in the specified group in Microsoft Teams based on the group ID, channel ID, message ID, and message you have specified. reply_messages
Investigation
Messages Mention Mentions a specific user to a specific message and channel in Microsoft Teams based on the team or group ID, channel ID, user ID, user display name, and message you have specified. messages_mention
Investigation
Create Team Creates a new team in Microsoft Teams based on the display name, description, and other input parameters you have specified. create_team
Investigation
List User Joined Teams Retrieves the teams in which the specified user is a direct member from Microsoft Teams based on the user ID you have specified. list_user_joined_teams
Investigation
Get Team Retrieves detailed information about a team from Microsoft Teams based on the team or group ID you have specified. get_team
Investigation
Update Team Updates the properties for an existing team in Microsoft Teams based on the team ID and properties you have specified. update_team
Investigation
Archive Team Archives the specified team in Microsoft Teams based on the team ID you have specified.
NOTE: When a team is archived, users can no longer send or like messages on any channel that is part of the archived team.
archive_team
Investigation
Unarchive Team Restores an archived team in Microsoft Teams based on the team ID you have specified. Unarchiving a team restores the user's ability to send messages to the team and to edit the properties of the team. unarchive_team
Investigation
Clone Team Creates a copy of a specified team in Microsoft Teams based on the team ID, display name, mail nick name, and other input parameters you have specified. This operation also creates a copy of the team's corresponding group. clone_team
Investigation
Create Meeting Creates a new meeting in Microsoft Teams based on the user ID, subject, and other input parameters you have specified. create_meeting
Investigation
Get Meeting Retrieves details for meeting from Microsoft Teams based on the user ID, meeting ID, and other input parameters you have specified. get_meeting
Investigation
Update Meeting Updates the properties for an existing meeting in Microsoft Teams based on the user ID, meeting ID and other input parameters you have specified. update_meeting
Investigation
Delete Meeting Deletes an existing meeting in Microsoft Teams based on the user ID and meeting ID you have specified. delete_meeting
Investigation
Send Chat Message Sends a new chatMessage in the specified chat. Note: This action is not supported for Application Permission. send_chat
Investigation

operation: Create User

Input parameters

Parameter Description
Display Name Specify the name to display in the address book for the user that you want to create in Microsoft Teams.
NOTE: Maximum length for the user's display name is 256 characters.
Account Enabled Select this checkbox, i.e, set it to "true", to enable the newly created account in Microsoft Teams. By default, this is set as "false".
Mail Nick Name Specify the mail alias for the user that you want to create in Microsoft Teams.
User Principal Name Specify the principal name of the user, for example, someuser@example.com, that you want to create in Microsoft Teams.
Password Specify the password to be set for the user that you want to create in Microsoft Teams. You must set this password when you are creating a user in Microsoft Teams. Passwords can be updated. However, the user will be required to change the password on their next login. The password must satisfy minimum requirements as specified by the "passwordPolicies" parameters of the user. By default, a strong password is required.
Force Change Password Next SignIn Select this checkbox, i.e, set it to "true", to force users to change their password when they sign in to Microsoft Teams the next time. Once the user has changed their password, this parameter automatically resets to false. By default, this is set as "false".
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to specify for the user you want to create in Microsoft Team. The additional properties signify additional fields associated with the user.

Output

The output contains the following populated JSON schema:
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"displayName": "",
"mobilePhone": "",
"@odata.context": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}

operation: Get All Users

Input parameters

Parameter Description
Filter Query Specify the filter query based on which you want to retrieve groups. Refer to Azure Filter Query Parameters for information on the filter query syntax.
Select Query Specify the $select query to retrieve groups from Microsoft Teams. The OData's Select query is supported on fields such as id, userPrincipalName, displayName, etc. Refer to OData system query options for more information.
Search Query Specify the search query to retrieve user details from Azure Active Directory. The OData's Search query is supported on fields such as id, userPrincipalName, displayName, etc. Refer to OData system query options for more information.
Order By (Optional) Specify the order in which you want to sort the results retrieved from Microsoft Teams. You can specify asc or desc.
By default, this is set to asc.
Number of Users to Fetch (Optional) Specify the maximum number of users that this operation should return from Microsoft Teams.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to specify for the user you want to create in Microsoft Team. The additional properties signify additional fields associated with the user.

Output

The output contains the following populated JSON schema:
{
"data": {
"value": [
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"displayName": "",
"mobilePhone": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}
],
"@odata.context": ""
}
}

operation: Get User

Input parameters

Parameter Description
Based On Select the parameter using which you want to retrieve details for a user from Microsoft Teams. You can choose from the following options:
  • User ID: Specify the ID of the user whose details you want to retrieve from Microsoft Teams, in the User ID field.
  • User Principal Name: Specify the User Principal Name of the user whose details you want to retrieve from Microsoft Teams, in the User Principal Name field. If this parameter is not specified then it returns all user details.

Output

The output contains the following populated JSON schema:
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"displayName": "",
"mobilePhone": "",
"@odata.context": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}

operation: Update User

Input parameters

Parameter Description
Based On Select the parameter using which you want to update details of a user in Microsoft Teams. You can choose from the following options:
  • User ID: Specify the ID of the user whose details you want to update in the User ID field.
  • User Principal Name: Specify the User Principal Name of the user whose details you want to update in the User Principal Name field.
Display Name Specify the display name that you want to update in the address book for the Microsoft Teams user.
Given Name Specify the given name (first name) that you want to update for the Microsoft Teams user.
Surname Specify the surname that you want to update for the Microsoft Teams user.
Job Title Specify the job title that you want to update for the Microsoft Teams user.
Office Location Specify the office location, i.e., the user's place of business that you want to update for the Microsoft Teams user.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to update for the Microsoft Teams user. The additional properties signify additional fields associated with the user.

Output

The output contains the following populated JSON schema:
{
"message": ""
}

operation: Delete User

Input parameters

Parameter Description
Based On Select the parameter using which you want to delete the user in Microsoft Teams. You can choose from the following options:
  • User ID: Specify the ID of the user to delete in the User ID field.
  • User Principal Name: Specify the User Principal Name of the user whose details you want to delete in the User Principal Name field.

Output

The output contains the following populated JSON schema:
{
"message": ""
}

operation: Create Group

Input parameters

Parameter Description
Display Name Specify the name to display in the address book for the group that you want to create in Microsoft Teams.
NOTE: Maximum length for the group's display name is 256 characters.
Mail Nickname Specify the mail alias for the group that you want to create in Microsoft Teams.
NOTE: Spaces are not allowed in the mail alias for the group.
Email Enabled Select this checkbox for mail-enabled groups.
Security Enabled Select this checkbox only for security-enabled groups, including Office 365 groups.
Group Type Specify the group type. If the collection contains Unified, the group is a Microsoft 365 group; otherwise, it's either a security group or distribution group. For details, see: https://learn.microsoft.com/en-us/graph/api/resources/groups-overview?view=graph-rest-1.0#group-types-in-azure-ad-and-microsoft-graph
Description Specify a Description of the group that you want to create in Microsoft Teams.
Visibility Specify the visibility to be set for the Office 365 group that you want to create in Microsoft Teams. You can choose from the following options: Private, Public, HiddenMembership, or "empty" (which is interpreted as Public).
Custom Properties Specify the additional properties, in JSON format, that you want to specify for the group you want to create in Microsoft Team. The additional properties signify additional fields associated with the group.

Output

The output contains the following populated JSON schema:
{
"id": "",
"mail": "",
"theme": "",
"groupTypes": [],
"visibility": "",
"description": "",
"displayName": "",
"mailEnabled": "",
"mailNickname": "",
"@odata.context": "",
"classification": "",
"membershipRule": "",
"proxyAddresses": [],
"createdDateTime": "",
"creationOptions": [],
"deletedDateTime": "",
"renewedDateTime": "",
"securityEnabled": "",
"preferredLanguage": "",
"expirationDateTime": "",
"isAssignableToRole": "",
"securityIdentifier": "",
"onPremisesDomainName": "",
"onPremisesNetBiosName": "",
"onPremisesSyncEnabled": "",
"preferredDataLocation": "",
"resourceBehaviorOptions": [],
"onPremisesSamAccountName": "",
"onPremisesLastSyncDateTime": "",
"resourceProvisioningOptions": [],
"onPremisesProvisioningErrors": [],
"onPremisesSecurityIdentifier": "",
"membershipRuleProcessingState": ""
}

operation: Get Groups

Input parameters

Parameter Description
Group ID Specify the ID of the group whose details you want to retrieve from Microsoft Teams.
NOTE: If you do not specify this parameter, then details of all the groups are returned.
Custom Properties Specify the additional properties, in the JSON format, that you want to specify for the group you want to create in Microsoft Team. The additional properties signify additional fields associated with the group.

Output

The output contains the following populated JSON schema:

Output schema when the "Group ID" is not specified:
{
"id": "",
"mail": "",
"theme": "",
"groupTypes": [],
"visibility": "",
"description": "",
"displayName": "",
"mailEnabled": "",
"mailNickname": "",
"classification": "",
"membershipRule": "",
"proxyAddresses": [],
"createdDateTime": "",
"creationOptions": [],
"deletedDateTime": "",
"renewedDateTime": "",
"securityEnabled": "",
"preferredLanguage": "",
"expirationDateTime": "",
"isAssignableToRole": "",
"securityIdentifier": "",
"onPremisesDomainName": "",
"onPremisesNetBiosName": "",
"onPremisesSyncEnabled": "",
"preferredDataLocation": "",
"resourceBehaviorOptions": [],
"onPremisesSamAccountName": "",
"onPremisesLastSyncDateTime": "",
"resourceProvisioningOptions": [],
"onPremisesProvisioningErrors": [],
"onPremisesSecurityIdentifier": "",
"membershipRuleProcessingState": ""
}

Output schema when the "Group ID" is not specified:
{
"data": {
"value": [
{
"id": "",
"mail": "",
"theme": "",
"groupTypes": [],
"visibility": "",
"description": "",
"displayName": "",
"mailEnabled": "",
"mailNickname": "",
"classification": "",
"membershipRule": "",
"proxyAddresses": [],
"createdDateTime": "",
"creationOptions": [],
"deletedDateTime": "",
"renewedDateTime": "",
"securityEnabled": "",
"preferredLanguage": "",
"expirationDateTime": "",
"isAssignableToRole": "",
"securityIdentifier": "",
"onPremisesDomainName": "",
"onPremisesNetBiosName": "",
"onPremisesSyncEnabled": "",
"preferredDataLocation": "",
"resourceBehaviorOptions": [],
"onPremisesSamAccountName": "",
"onPremisesLastSyncDateTime": "",
"resourceProvisioningOptions": [],
"onPremisesProvisioningErrors": [],
"onPremisesSecurityIdentifier": "",
"membershipRuleProcessingState": ""
}
],
"@odata.context": ""
}
}

operation: Delete Group

Input parameters

Parameter Description
Group ID Specify the ID of the group that you want to delete from Microsoft Teams.
NOTE: Every team is associated with a group and the group has the same ID as the team.

Output

The output contains the following populated JSON schema:
{
"message": ""
}

operation: Add Group Owner

Input parameters

Parameter Description
Group ID Specify the ID of the group in Microsoft Teams to which you want to add the specific user as a group owner.
User ID Specify the ID of the user who you want to add as the group owner of the specified group in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"result": {
"user_id": "",
"group_id": ""
},
"status": "",
"message": ""
}

operation: Get Group Owner

Input parameters

Parameter Description
Group ID Specify the ID of the group whose group owner details you want to retrieve from Microsoft Teams.
Custom Properties Specify the additional properties, in the JSON format, that you want to specify for the group you want to create in Microsoft Team. The additional properties signify additional fields associated with the group.

Output

The output contains the following populated JSON schema:
{
"data": {
"value": [
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"@odata.type": "",
"displayName": "",
"mobilePhone": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}
],
"@odata.context": ""
}
}

operation: Remove Group Owner

Input parameters

Parameter Description
Group ID Specify the ID of the group in Microsoft Teams from which you want to remove the specific user as a group owner.
Owner ID Specify the ID of the owner who you want to remove as the group owner of the specified group in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"result": {
"user_id": "",
"group_id": ""
},
"status": "",
"message": ""
}

operation: Add Group Member

Input parameters

Parameter Description
Group ID Specify the ID of the group in Microsoft Teams to which you want to add the specific user as a member.
User ID Specify the ID of the user who you want to add as a member of the specified group in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"result": {
"owner_id": "",
"group_id": ""
},
"status": "",
"message": ""
}

operation: Get Group Members

Input parameters

Parameter Description
Group ID Specify the ID of the group whose direct members you want to retrieve from Microsoft Teams.
User ID Specify the ID of the member belonging to the specified group whose details you want to retrieve from Microsoft Teams.
Custom Properties Specify the additional properties, in the JSON format, that you want to specify for the group you want to create in Microsoft Team. The additional properties signify additional fields associated with the group.

Output

The output contains the following populated JSON schema:

Output schema when the "User ID" is not specified:
{
"@odata.context": "",
"@odata.type": "",
"id": "",
"businessPhones": [],
"displayName": "",
"givenName": "",
"jobTitle": "",
"mail": "",
"mobilePhone": "",
"officeLocation": "",
"preferredLanguage": "",
"surname": "",
"userPrincipalName": ""
}

Output schema when the "User ID" is not specified:
{
"data": {
"value": [
{
"id": "",
"mail": "",
"surname": "",
"jobTitle": "",
"givenName": "",
"@odata.type": "",
"displayName": "",
"mobilePhone": "",
"businessPhones": [],
"officeLocation": "",
"preferredLanguage": "",
"userPrincipalName": ""
}
],
"@odata.context": ""
}
}

operation: Remove Group Member

Input parameters

Parameter Description
Group ID Specify the ID of the group which you want to remove from member of that group
User ID Specify the ID of the user who you want to remove as the group member of the specified group in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"result": {
"user_id": "",
"group_id": ""
},
"status": "",
"message": ""
}

operation: Create Channel

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group in that you want to create a new channel in Microsoft Teams. Note: Every team is associated with a group and the group has the same ID as the team.
Channel Name Specify the name of the channel that you want to create in Microsoft Teams.
Description Specify the description of the channel that you want to create in Microsoft Teams.
Membership Type Select the type of membership that would be allowed for the channel that you want to create in Microsoft Teams.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to specify for the channel you want to create in Microsoft Team. The additional properties signify additional fields associated with the channel.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"isFavoriteByDefault": "",
"email": "",
"webUrl": "",
"membershipType": ""
}

operation: Get Channel

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group that contains the channel whose information you want to retrieve from Microsoft Teams. Note: Every team is associated with a group and the group has the same ID as the team.
Channel ID Specify the ID of the channel whose information you want to retrieve from Microsoft Teams.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to specify for the channel you want to create in Microsoft Team. The additional properties signify additional fields associated with the channel.

Output

The output contains the following populated JSON schema:

Output schema when the "Channel ID" is not specified:
{
"value": [
{
"@odata.context": "",
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"isFavoriteByDefault": "",
"email": "",
"tenantId": "",
"webUrl": "",
"membershipType": ""
}
]
}

Output schema when the "Channel ID" is not specified:
{
"@odata.context": "",
"@odata.count": "",
"value": [
{
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"isFavoriteByDefault": "",
"email": "",
"tenantId": "",
"webUrl": "",
"membershipType": ""
}
]
}

operation: Get Channel Messages

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group in Microsoft Teams from which you want to retrieve messages from the specified channel. Note: Every team is associated with a group and the group has the same ID as the team.
Channel ID Specify the ID of the channel in Microsoft Teams from which you retrieve messages.
Message ID Specify the ID of the message whose details you want to retrieve from Microsoft Teams.

Output

The output contains the following populated JSON schema:

Output schema when the "Message ID" is not specified:
{
"@odata.context": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": "",
"tenantId": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"channelIdentity": {
"teamId": "",
"channelId": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}

Output schema when the "Message ID" is not specified:
{
"@odata.context": "",
"@odata.count": "",
"value": [
{
"id": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": "",
"tenantId": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"channelIdentity": {
"teamId": "",
"channelId": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}
]
}

operation: Send Channel Message

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group in Microsoft Teams to whom you want to send the group message.
NOTE: Every team is associated with a group and the group has the same ID as the team.
Channel ID Specify the ID of the channel in Microsoft Teams on which you want to send the message.
Message Type Select if you need to send a simple text message, html or an Adaptive card template.
  • Text: Specify the content of the group message that you want to send to a specific channel on a specific group or team in Microsoft Teams, in the Message field.
  • Adaptive Card Template: Specify adaptive cards schema in json format. For more info, refer https://adaptivecards.io/designer/.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"channelIdentity": {
"teamId": "",
"channelId": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}

operation: Reply Message

Input parameters

Parameter Description
Group ID Specify the ID of Group in Microsoft Teams whose conversation information you want to retrieve and to which you want to reply.
Channel ID Specify the ID of the channel in Microsoft Teams on which you want to send the reply to the specific message.
Message ID Specify the ID of the message in Microsoft Teams to which you want to send a reply.
Message Specify the content of the message that you want to send as a reply to the specified message.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"from": {
"application": "",
"device": "",
"conversation": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}

operation: Messages Mention

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group in Microsoft Teams in which you want to add a mention of the specific user.
NOTE: Every team is associated with a group and the group has the same ID as the team.
Channel ID Specify the ID of the channel in Microsoft Teams in which you want to add a mention of the specific user.
Message Specify the content of the message in which you want to add a mention of the specific user.
User ID Specify the ID of the user who you want to mention in the message.
User Display Name Specify the display name of the user who you want to mention in the message.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"channelIdentity": {
"teamId": "",
"channelId": ""
},
"attachments": [],
"mentions": [
{
"id": "",
"mentionText": "",
"mentioned": {
"application": "",
"device": "",
"conversation": "",
"tag": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
}
}
],
"reactions": []
}

operation: Create Team

Input parameters

Parameter Description
Display Name Specify the display name of the team that you want to create in Microsoft Teams. Note: Maximum length for the team's display name is 256 characters.
Description Specify the description of the team that you want to create in Microsoft Teams.
User ID Specify the ID of the user whose teams you want to create in Microsoft Teams.Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.
Bind Team Template Specify the name of the Bind Team Template for the team that you want to create in Microsoft Teams. Note: If you do not provide any value, the default template will be used.
Visibility Specify the visibility to be set for the Office 365 group that you want to create in Microsoft Teams. You can choose from the following options: Private, Public, HiddenMembership, or "empty" (which is interpreted as Public).
Custom Properties (Optional) Specify the additional properties, in the JSON format, provides other required fields of the team that you want to add properties of team

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": "",
"displayName": ""
}

operation: List User Joined Teams

Input parameters

Parameter Description
User ID Specify the ID of the user whose teams' membership information you want to retrieve from Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"@odata.count": "",
"value": [
{
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"internalId": "",
"classification": "",
"specialization": "",
"visibility": "",
"webUrl": "",
"isArchived": "",
"tenantId": "",
"isMembershipLimitedToOwners": "",
"memberSettings": "",
"guestSettings": "",
"messagingSettings": "",
"funSettings": "",
"discoverySettings": "",
"summary": ""
}
]
}

operation: Get Team

Input parameters

Parameter Description
Team/Group ID Specify the ID of team or group whose detailed information you want to retrieve from Microsoft Teams. from which you want to retrieve messages from the specified channel. Note: Every team is associated with a group and the group has the same ID as the team.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to create meeting in Microsoft Team.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"internalId": "",
"classification": "",
"specialization": "",
"visibility": "",
"webUrl": "",
"isArchived": "",
"isMembershipLimitedToOwners": "",
"discoverySettings": {
"showInTeamsSearchAndSuggestions": ""
},
"memberSettings": {
"allowCreateUpdateChannels": "",
"allowCreatePrivateChannels": "",
"allowDeleteChannels": "",
"allowAddRemoveApps": "",
"allowCreateUpdateRemoveTabs": "",
"allowCreateUpdateRemoveConnectors": ""
},
"guestSettings": {
"allowCreateUpdateChannels": "",
"allowDeleteChannels": ""
},
"messagingSettings": {
"allowUserEditMessages": "",
"allowUserDeleteMessages": "",
"allowOwnerDeleteMessages": "",
"allowTeamMentions": "",
"allowChannelMentions": ""
},
"funSettings": {
"allowGiphy": "",
"giphyContentRating": "",
"allowStickersAndMemes": "",
"allowCustomMemes": ""
},
"summary": {
"ownersCount": "",
"membersCount": "",
"guestsCount": ""
}
}

operation: Update Team

Input parameters

Parameter Description
Team ID Specify the ID of an existing team whose properties you want to update in Microsoft Teams.
Custom Properties Specify the additional properties, in the JSON format, that you want to specify for the team you want to update in Microsoft Team. The additional properties signify additional fields associated with the team.

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": "",
"result": {
"@odata.context": "",
"id": "",
"createdDateTime": "",
"displayName": "",
"description": "",
"internalId": "",
"classification": "",
"specialization": "",
"visibility": "",
"webUrl": "",
"isArchived": "",
"isMembershipLimitedToOwners": "",
"discoverySettings": {
"showInTeamsSearchAndSuggestions": ""
},
"memberSettings": {
"allowCreateUpdateChannels": "",
"allowCreatePrivateChannels": "",
"allowDeleteChannels": "",
"allowAddRemoveApps": "",
"allowCreateUpdateRemoveTabs": "",
"allowCreateUpdateRemoveConnectors": ""
},
"guestSettings": {
"allowCreateUpdateChannels": "",
"allowDeleteChannels": ""
},
"messagingSettings": {
"allowUserEditMessages": "",
"allowUserDeleteMessages": "",
"allowOwnerDeleteMessages": "",
"allowTeamMentions": "",
"allowChannelMentions": ""
},
"funSettings": {
"allowGiphy": "",
"giphyContentRating": "",
"allowStickersAndMemes": "",
"allowCustomMemes": ""
},
"summary": {
"ownersCount": "",
"membersCount": "",
"guestsCount": ""
}
}
}

operation: Archive Team

Input parameters

Parameter Description
Team ID Specify the ID of an existing team that you want to archive in Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": ""
}

operation: Unarchive Team

Input parameters

Parameter Description
Team ID Specify the ID of an existing team whose archive you want to restore from Microsoft Teams.

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": ""
}

operation: Clone Team

Input parameters

Parameter Description
Team ID Specify the ID of the existing team whose clone you want to create in Microsoft Teams.
Display Name Specify the mail alias for the team that you have cloned in Microsoft Team, which must be unique in the organization. This parameter must be specified when a group is created or cloned. If this parameter is not specified, it will be computed from the Display Name.
NOTE: Known issue: This parameter is currently being ignored.
Mail Nick Name Specify the mail alias for the group, unique in the organization. This property must be specified when a group is created. If this property is not specified, it will be computed from the displayName. Known issue: this property is currently ignored
Parts to clone Specify a CSV list of the parts of the team you want to clone. Legal parts are "apps", "tabs", "settings", "channels", and "members".
Visibility Specify the visibility to be set for the team that you want to clone in Microsoft Teams. You can choose from the following options: Private or Public (which is interpreted as Public).

Output

The output contains the following populated JSON schema:
{
"status": "",
"message": ""
}

operation: Create Meeting

Input parameters

Parameter Description
Subject Specify a subject of the meeting that you want to create in Microsoft Teams.
User ID Specify the ID of the user who you want to create meeting in Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.
Start Time Specify a start time of the meeting that you want to create in Microsoft Teams.
End Time Specify an end time of the meeting that you want to create in Microsoft Teams.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to create meeting in Microsoft Team.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"creationDateTime": "",
"startDateTime": "",
"endDateTime": "",
"joinUrl": "",
"joinWebUrl": "",
"meetingCode": "",
"subject": "",
"isBroadcast": "",
"autoAdmittedUsers": "",
"outerMeetingAutoAdmittedUsers": "",
"isEntryExitAnnounced": "",
"allowedPresenters": "",
"allowMeetingChat": "",
"allowTeamworkReactions": "",
"allowAttendeeToEnableMic": "",
"allowAttendeeToEnableCamera": "",
"recordAutomatically": "",
"anonymizeIdentityForRoles": [],
"capabilities": [],
"videoTeleconferenceId": "",
"externalId": "",
"broadcastSettings": "",
"joinMeetingIdSettings": {
"isPasscodeRequired": "",
"joinMeetingId": "",
"passcode": ""
},
"audioConferencing": "",
"meetingInfo": "",
"participants": {
"organizer": {
"upn": "",
"role": "",
"identity": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"tenantId": "",
"identityProvider": ""
}
}
},
"attendees": []
},
"lobbyBypassSettings": {
"scope": "",
"isDialInBypassEnabled": ""
},
"chatInfo": {
"threadId": "",
"messageId": "",
"replyChainMessageId": ""
},
"joinInformation": {
"content": "",
"contentType": ""
}
}

operation: Get Meeting

Input parameters

Parameter Description
Meeting ID Specify the ID of the meeting whose details you want to retrieve from Microsoft Teams.
User ID Specify the ID of the user whose details you want to retrieve from Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.
Custom Properties (Optional) Specify the additional properties, in the JSON format, that you want to retrieve meeting properties from Microsoft Team.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"creationDateTime": "",
"startDateTime": "",
"endDateTime": "",
"joinUrl": "",
"joinWebUrl": "",
"meetingCode": "",
"subject": "",
"isBroadcast": "",
"autoAdmittedUsers": "",
"outerMeetingAutoAdmittedUsers": "",
"isEntryExitAnnounced": "",
"allowedPresenters": "",
"allowMeetingChat": "",
"allowTeamworkReactions": "",
"allowAttendeeToEnableMic": "",
"allowAttendeeToEnableCamera": "",
"recordAutomatically": "",
"anonymizeIdentityForRoles": [],
"capabilities": [],
"videoTeleconferenceId": "",
"externalId": "",
"broadcastSettings": "",
"joinMeetingIdSettings": {
"isPasscodeRequired": "",
"joinMeetingId": "",
"passcode": ""
},
"audioConferencing": "",
"meetingInfo": "",
"participants": {
"organizer": {
"upn": "",
"role": "",
"identity": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"tenantId": "",
"identityProvider": ""
}
}
},
"attendees": []
},
"lobbyBypassSettings": {
"scope": "",
"isDialInBypassEnabled": ""
},
"chatInfo": {
"threadId": "",
"messageId": "",
"replyChainMessageId": ""
},
"joinInformation": {
"content": "",
"contentType": ""
}
}

operation: Update Meeting

Input parameters

Parameter Description
Meeting ID Specify the ID of an existing meeting whose properties you want to update in Microsoft Teams.
User ID Specify the ID of an user whose associated meeting properties you want to update in Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.
Start Time Specify a start time of the meeting that you want to update in Microsoft Teams.
End Time Specify an end time of the meeting that you want to update in Microsoft Teams.
Subject Specify a subject of the meeting that you want to update in Microsoft Teams.
Enable Camera Specify if attendees can turn on their camera.
Enable Mic Specify if attendees can turn on their microphone.
Custom Properties Specify the additional properties, in the JSON format, that you want to meeting properties in update in Microsoft Team. The additional properties signify additional fields associated with the meeting.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"id": "",
"creationDateTime": "",
"startDateTime": "",
"endDateTime": "",
"joinUrl": "",
"joinWebUrl": "",
"meetingCode": "",
"subject": "",
"isBroadcast": "",
"autoAdmittedUsers": "",
"outerMeetingAutoAdmittedUsers": "",
"isEntryExitAnnounced": "",
"allowedPresenters": "",
"allowMeetingChat": "",
"allowTeamworkReactions": "",
"allowAttendeeToEnableMic": "",
"allowAttendeeToEnableCamera": "",
"recordAutomatically": "",
"anonymizeIdentityForRoles": [],
"capabilities": [],
"videoTeleconferenceId": "",
"externalId": "",
"broadcastSettings": "",
"joinMeetingIdSettings": {
"isPasscodeRequired": "",
"joinMeetingId": "",
"passcode": ""
},
"audioConferencing": "",
"meetingInfo": "",
"participants": {
"organizer": {
"upn": "",
"role": "",
"identity": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"tenantId": "",
"identityProvider": ""
}
}
},
"attendees": []
},
"lobbyBypassSettings": {
"scope": "",
"isDialInBypassEnabled": ""
},
"chatInfo": {
"threadId": "",
"messageId": "",
"replyChainMessageId": ""
},
"joinInformation": {
"content": "",
"contentType": ""
}
}

operation: Delete Meeting

Input parameters

Parameter Description
Meeting ID Specify the ID of an existing meeting which you want to delete in Microsoft Teams.
User ID Specify the ID of an user whose associated meeting you want to delete in Microsoft Teams. Note: For application permissions, it works for all users by specifying the specific user ID and with delegate permissions, only current user is considered, no need to specify user ID for delegate permissions.

Output

The output contains the following populated JSON schema:
{
"message": ""
}

operation: Send Chat Message

Input parameters

Parameter Description
Sender User Email Specify the email address of your account from which you want to send chat message.
Receiver User Email Specify the email address of receiver for to whom you want to send chat message.
Message Type Select if you need to send a simple text message or an HTML.
  • Text: Specify the content of the group message, in the Message field, that you want to send to a specific channel on a specific group or team in Microsoft Teams.
  • Card: Specify values in following fields:
    • Title: Specify the title of message card that you want to send to a specific channel on a specific group or team in Microsoft Teams.
    • Subtitle: Specify the title of message card that you want to send to a specific channel on a specific group or team in Microsoft Teams.
    • Body: Specify the message content with elements such as buttons.
    • Subject: Specify the subject of the message that you want to send to a specific channel on a specific group or team in Microsoft Teams.
    • Buttons: Specify the list of button objects to be added to the message.

Output

The output contains the following populated JSON schema:
{
"@odata.context": "",
"replyToId": "",
"etag": "",
"messageType": "",
"createdDateTime": "",
"lastModifiedDateTime": "",
"lastEditedDateTime": "",
"deletedDateTime": "",
"subject": "",
"summary": "",
"chatId": "",
"importance": "",
"locale": "",
"webUrl": "",
"channelIdentity": "",
"policyViolation": "",
"eventDetail": "",
"from": {
"application": "",
"device": "",
"user": {
"id": "",
"displayName": "",
"userIdentityType": ""
}
},
"body": {
"contentType": "",
"content": ""
},
"attachments": [],
"mentions": [],
"reactions": []
}

Included playbooks

The Sample - Microsoft Teams - 2.0.0 playbook collection comes bundled with the Microsoft Teams connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the Microsoft Teams connector.

NOTE: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.

Previous
Next