MicrosoftGraphTeams
Microsoft Graph lets your app get authorized access to a user's Teams app in a personal or organization account.
Messaging and Conferencing · MicrosoftGraphTeams
Details
| ID | MicrosoftGraphTeams |
|---|---|
| Provider | Microsoft |
| Category | Messaging and Conferencing |
| From Version | 6.0.0 |
| Docker Image | demisto/crypto:1.0.0.11658507 |
| Supported Modules | Agentix Cloud Runtime Security Cloud Posture Security XSIAM EDR Cortex Cloud |
README
Microsoft Graph lets your app get authorized access to a user’s Teams app in a personal or organization account.
This is a long-running integration. For more information about long-running integrations, see the Cortex XSOAR 8 Cloud, Cortex XSOAR 8 On-prem or Cortex XSIAM documentation.
Configure O365 Teams (Using Graph API) in Cortex
| Parameter | Description | Required |
|---|---|---|
| Server URL | True | |
| Tenant ID | Token or Tenant ID - see Detailed Instructions (?) | True |
| Client ID | ID or Client ID - see Detailed Instructions (?) | True |
| Client Secret | Key or Client Secret - see Detailed Instructions (?) | False |
| Certificate Thumbprint | Used for certificate authentication. As appears in the “Certificates & secrets” page of the app. | False |
| Private Key | Used for certificate authentication. The private key of the registered certificate. | False |
| Use a self deployed Azure Application | False | |
| Application redirect URI (for Authorization Code flow mode) | False | |
| Authorization Code | Authorization code on behalf of a user, used with self deployed Azure Applications. | False |
| Email address of the XSOAR delegated Teams user (e.g. “example@demisto.com”) | True | |
| Trust any certificate (not secure) | False | |
| Use system proxy settings | False | |
| Suppress Errors for Non Found Users | False |
Required Permissions
Chat.Create - Delegated
Chat.Read - Delegated
Chat.ReadBasic - Delegated
Chat.ReadWrite - Delegated
ChatMember.Read - Delegated
ChatMember.ReadWrite - Delegated
ChatMessage.Read - Delegated
ChatMessage.Send - Delegated
Commands
You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.
msgraph-teams-list-chats
Retrieve the list of chats that the user is part of.
Base Command
msgraph-teams-list-chats
Input
| Argument Name | Description | Required |
|---|---|---|
| user_id | User ID to use Teams as (can be principal ID (email address)). | Optional |
| odata | An OData query. See README for OData usage examples. | Optional |
| limit | Limit chats to fetch in one request. Default is 20. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| MSGraphTeamsChat.ID | String | The ID of the chat. |
| MSGraphTeamsChat.UserID | String | The ID of the user. |
| MSGraphTeamsChat.Subject | String | The title of the chat. |
| MSGraphTeamsChat.Created | Date | The time the chat was created. |
| MSGraphTeamsChat.LastUpdatedTime | Date | The time the chat was last updated. |
| MSGraphTeamsChat.Type | String | The type of chat. |
msgraph-teams-create-chat
Create a new chat.
Base Command
msgraph-teams-create-chat
Input
| Argument Name | Description | Required |
|---|---|---|
| user_id | User ID to use Teams as (can be principal ID (email address)). | Optional |
| subject | The title of the chat. | Required |
| type | Specifies the type of chat. Possible values are: group and oneOnOne. Possible values are: group, oneOnOne. Default is group. | Optional |
| members | A comma-separated list members that should be added. using user principal name (email). | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| MSGraphTeamsChat.ID | String | The ID of the chat. |
| MSGraphTeamsChat.UserID | String | The ID of the user. |
| MSGraphTeamsChat.Subject | String | The title of the chat. |
| MSGraphTeamsChat.Created | Date | The time the chat was created. |
| MSGraphTeamsChat.LastUpdatedTime | Date | The time the chat was last updated. |
| MSGraphTeamsChat.Type | String | The type of chat. |
msgraph-teams-get-chat
Retrieve a single chat (without its messages).
Base Command
msgraph-teams-get-chat
Input
| Argument Name | Description | Required |
|---|---|---|
| user_id | User ID to use Teams as (can be principal ID (email address)). | Optional |
| chat_id | The chat’s unique identifier. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| MSGraphTeamsChat.ID | String | The ID of the chat. |
| MSGraphTeamsChat.UserID | String | The ID of the user. |
| MSGraphTeamsChat.Subject | String | The title of the chat. |
| MSGraphTeamsChat.Created | Date | The time the chat was created. |
| MSGraphTeamsChat.LastUpdatedTime | Date | The time the chat was last updated. |
| MSGraphTeamsChat.Type | String | The type of chat. |
msgraph-teams-update-chat
Update the properties of a chat object.
Base Command
msgraph-teams-update-chat
Input
| Argument Name | Description | Required |
|---|---|---|
| chat_id | The chat’s unique identifier. | Required |
| subject | The title of the chat. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| MSGraphTeamsChat.ID | String | The ID of the chat. |
| MSGraphTeamsChat.UserID | String | The ID of the user. |
| MSGraphTeamsChat.Subject | String | The title of the chat. |
| MSGraphTeamsChat.Created | Date | The time the chat was created. |
| MSGraphTeamsChat.LastUpdatedTime | Date | The time the chat was last updated. |
| MSGraphTeamsChat.Type | String | The type of chat. |
msgraph-teams-list-members
List all conversation members in a chat.
Base Command
msgraph-teams-list-members
Input
| Argument Name | Description | Required |
|---|---|---|
| user_id | User ID to use Teams as (can be principal ID (email address)). | Optional |
| chat_id | The chat’s unique identifier. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| MSGraphTeamsChatMember.ID | String | The ID of the chat member. |
| MSGraphTeamsChatMember.Name | String | The display name of the chat member. |
| MSGraphTeamsChatMember.HistoryStartTime | Date | The timestamp denoting how far back a conversation’s history is shared with the conversation member. This property is settable only for members of a chat. |
| MSGraphTeamsChatMember.ChatID | unknown | The ID of the chat. |
msgraph-teams-add-member
Add a conversationMember to a chat.
Base Command
msgraph-teams-add-member
Input
| Argument Name | Description | Required |
|---|---|---|
| chat_id | The chat’s unique identifier. | Required |
| user_id | User ID to add to Teams chat (can be principal ID (email address)). | Required |
| share_history | Allowing sharing of the whole history of the chat. Possible values are: true, false. Default is true. | Optional |
Context Output
There is no context output for this command.
msgraph-teams-list-messages
Retrieve the list of messages in a chat.
Base Command
msgraph-teams-list-messages
Input
| Argument Name | Description | Required |
|---|---|---|
| user_id | User ID to use Teams as (can be principal ID (email address)). | Optional |
| chat_id | The chat’s unique identifier. | Required |
| limit | Limit messages to fetch in one request. Default is 50. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| MSGraphTeamsChatMessage.ID | String | The ID of the message. |
| MSGraphTeamsChatMessage.ChatID | String | The ID of the chat. |
| MSGraphTeamsChatMessage.From | String | The Name of the sender of the chat message. |
| MSGraphTeamsChatMessage.Created | Date | Timestamp of when the chat message was created. |
| MSGraphTeamsChatMessage.LastModifiedTime | Date | Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed. |
| MSGraphTeamsChatMessage.Body | htmlBody | HTML representation of the content of the chat message. Representation is specified by the contentType inside the body. |
msgraph-teams-send-message
Send a new message in a chat.
Base Command
msgraph-teams-send-message
Input
| Argument Name | Description | Required |
|---|---|---|
| chat_id | The chat’s unique identifier. | Required |
| body | HTML representation of the content of the chat message. Representation is specified by the contentType inside the body. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| MSGraphTeamsChatMessage.ID | String | The ID of the message. |
| MSGraphTeamsChatMessage.chatID | String | The ID of the chat. |
| MSGraphTeamsChatMessage.From | String | The Name of the sender of the chat message. |
| MSGraphTeamsChatMessage.Created | Date | Timestamp of when the chat message was created. |
| MSGraphTeamsChatMessage.LastModifiedTime | Date | Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed. |
| MSGraphTeamsChatMessage.Body | htmlBody | HTML representation of the content of the chat message. Representation is specified by the contentType inside the body. |
msgraph-teams-test
Tests connectivity to Microsoft Graph Teams.
Base Command
msgraph-teams-test
Input
| Argument Name | Description | Required |
| — | — | — |
Context Output
There is no context output for this command.
msgraph-teams-auth-reset
Run this command if for some reason you need to rerun the authentication process.
Base Command
msgraph-teams-auth-reset
Input
| Argument Name | Description | Required |
| — | — | — |
Context Output
There is no context output for this command.
msgraph-teams-generate-login-url
Generate the login url used for Authorization code flow.
Base Command
msgraph-teams-generate-login-url
Input
| Argument Name | Description | Required |
| — | — | — |
Context Output
There is no context output for this command.
Configuration parameters
url— Server URL (required)tenant_id— Tenant ID (required)client_id— Client ID (required)secret— Client Secretcertificate_thumbprint— Certificate Thumbprintprivate_key— Private Keyself_deployed— Use a self deployed Azure Applicationredirect_uri— Application redirect URI (for Authorization Code flow mode)auth_code— Authorization Codedelegated_user— Email address of the XSOAR delegated Teams user (e.g. "example@demisto.com") (required)insecure— Trust any certificate (not secure)proxy— Use system proxy settingshandle_error— Suppress Errors for Non Found Users
Commands (11)
-
msgraph-teams-add-memberAdd a conversationMember to a chat.
-
msgraph-teams-auth-resetRun this command if for some reason you need to rerun the authentication process.
-
msgraph-teams-create-chatCreate a new chat.
-
msgraph-teams-generate-login-urlGenerate the login url used for Authorization code flow.
-
msgraph-teams-get-chatRetrieve a single chat (without its messages).
-
msgraph-teams-list-chatsRetrieve the list of chats that the user is part of.
-
msgraph-teams-list-membersList all conversation members in a chat.
-
msgraph-teams-list-messagesRetrieve the list of messages in a chat.
-
msgraph-teams-send-messageSend a new message in a chat.
-
msgraph-teams-testTests connectivity to Microsoft Graph Teams.
-
msgraph-teams-update-chatUpdate the properties of a chat object.
category: Messaging and Conferencing provider: Microsoft sectionorder: - Connect - Collect commonfields: id: MicrosoftGraphTeams version: -1 configuration: - defaultvalue: https://graph.microsoft.com display: Server URL name: url required: true type: 0 section: Connect - additionalinfo: Token or Tenant ID display: Tenant ID hiddenusername: true name: tenant_id required: true type: 4 section: Connect - additionalinfo: ID or Client ID display: Client ID hiddenusername: true name: client_id required: true type: 4 section: Connect - additionalinfo: Key or Client Secret display: Client Secret hiddenusername: true name: secret type: 4 required: false section: Connect - additionalinfo: Used for certificate authentication. As appears in the "Certificates & secrets" page of the app. display: Certificate Thumbprint name: certificate_thumbprint type: 4 required: false section: Connect - additionalinfo: Used for certificate authentication. The private key of the registered certificate. display: Private Key name: private_key type: 4 required: false section: Connect - display: Use a self deployed Azure Application name: self_deployed type: 8 required: false additionalinfo: Select this checkbox if you are using a self-deployed Azure application. section: Connect - display: Application redirect URI (for Authorization Code flow mode) name: redirect_uri type: 0 required: false section: Connect - additionalinfo: Authorization code on behalf of a user, used with self deployed Azure Applications. display: Authorization Code hiddenusername: true name: auth_code type: 4 required: false section: Connect - display: Email address of the XSOAR delegated Teams user (e.g. "example@demisto.com") name: delegated_user required: true type: 0 section: Connect - defaultvalue: "false" display: Trust any certificate (not secure) name: insecure type: 8 required: false section: Connect - defaultvalue: "false" display: Use system proxy settings name: proxy type: 8 required: false section: Connect - defaultvalue: "true" display: Suppress Errors for Non Found Users name: handle_error type: 8 required: false section: Collect description: Microsoft Graph lets your app get authorized access to a user's Teams app in a personal or organization account. display: O365 Teams (Using Graph API) name: MicrosoftGraphTeams script: commands: - arguments: - description: User ID to use Teams as (can be principal ID (email address)). name: user_id - description: An OData query. See README for OData usage examples. name: odata - defaultValue: "20" description: Limit chats to fetch in one request. name: limit description: Retrieve the list of chats that the user is part of. name: msgraph-teams-list-chats outputs: - contextPath: MSGraphTeamsChat.ID description: The ID of the chat. type: String - contextPath: MSGraphTeamsChat.UserID description: The ID of the user. type: String - contextPath: MSGraphTeamsChat.Subject description: The title of the chat. type: String - contextPath: MSGraphTeamsChat.Created description: The time the chat was created. type: Date - contextPath: MSGraphTeamsChat.LastUpdatedTime description: The time the chat was last updated. type: Date - contextPath: MSGraphTeamsChat.Type description: The type of chat. type: String - arguments: - description: User ID to use Teams as (can be principal ID (email address)). name: user_id - description: The title of the chat. Supported only for "group" type. name: subject - auto: PREDEFINED default: true defaultValue: group description: 'Specifies the type of chat. Possible values are: group and oneOnOne.' name: type predefined: - group - oneOnOne - description: A comma-separated list members that should be added. using user principal name (email). isArray: true name: members required: true description: Create a new chat. name: msgraph-teams-create-chat outputs: - contextPath: MSGraphTeamsChat.ID description: The ID of the chat. type: String - contextPath: MSGraphTeamsChat.UserID description: The ID of the user. type: String - contextPath: MSGraphTeamsChat.Subject description: The title of the chat. type: String - contextPath: MSGraphTeamsChat.Created description: The time the chat was created. type: Date - contextPath: MSGraphTeamsChat.LastUpdatedTime description: The time the chat was last updated. type: Date - contextPath: MSGraphTeamsChat.Type description: The type of chat. type: String - arguments: - description: User ID to use Teams as (can be principal ID (email address)). name: user_id - description: The chat's unique identifier. name: chat_id required: true description: Retrieve a single chat (without its messages). name: msgraph-teams-get-chat outputs: - contextPath: MSGraphTeamsChat.ID description: The ID of the chat. type: String - contextPath: MSGraphTeamsChat.UserID description: The ID of the user. type: String - contextPath: MSGraphTeamsChat.Subject description: The title of the chat. type: String - contextPath: MSGraphTeamsChat.Created description: The time the chat was created. type: Date - contextPath: MSGraphTeamsChat.LastUpdatedTime description: The time the chat was last updated. type: Date - contextPath: MSGraphTeamsChat.Type description: The type of chat. type: String - arguments: - description: The chat's unique identifier. name: chat_id required: true - description: The title of the chat. name: subject required: true description: Update the properties of a chat object. name: msgraph-teams-update-chat outputs: - contextPath: MSGraphTeamsChat.ID description: The ID of the chat. type: String - contextPath: MSGraphTeamsChat.UserID description: The ID of the user. type: String - contextPath: MSGraphTeamsChat.Subject description: The title of the chat. type: String - contextPath: MSGraphTeamsChat.Created description: The time the chat was created. type: Date - contextPath: MSGraphTeamsChat.LastUpdatedTime description: The time the chat was last updated. type: Date - contextPath: MSGraphTeamsChat.Type description: The type of chat. type: String - arguments: - description: User ID to use Teams as (can be principal ID (email address)). name: user_id - description: The chat's unique identifier. name: chat_id required: true description: List all conversation members in a chat. name: msgraph-teams-list-members outputs: - contextPath: MSGraphTeamsChatMember.ID description: The ID of the chat member. type: String - contextPath: MSGraphTeamsChatMember.Name description: The display name of the chat member. type: String - contextPath: MSGraphTeamsChatMember.HistoryStartTime description: The timestamp denoting how far back a conversation's history is shared with the conversation member. This property is settable only for members of a chat. type: Date - contextPath: MSGraphTeamsChatMember.ChatID description: The ID of the chat. - arguments: - description: The chat's unique identifier. name: chat_id required: true - description: User ID to add to Teams chat (can be principal ID (email address)). name: user_id required: true - auto: PREDEFINED default: true defaultValue: "true" description: Allowing sharing of the whole history of the chat. name: share_history predefined: - "true" - "false" description: Add a conversationMember to a chat. name: msgraph-teams-add-member - arguments: - description: User ID to use Teams as (can be principal ID (email address)). name: user_id - description: The chat's unique identifier. name: chat_id required: true - default: true defaultValue: "50" description: Limit messages to fetch in one request. name: limit description: Retrieve the list of messages in a chat. name: msgraph-teams-list-messages outputs: - contextPath: MSGraphTeamsChatMessage.ID description: The ID of the message. type: String - contextPath: MSGraphTeamsChatMessage.ChatID description: The ID of the chat. type: String - contextPath: MSGraphTeamsChatMessage.From description: The Name of the sender of the chat message. type: String - contextPath: MSGraphTeamsChatMessage.Created description: Timestamp of when the chat message was created. type: Date - contextPath: MSGraphTeamsChatMessage.LastModifiedTime description: Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed. type: Date - contextPath: MSGraphTeamsChatMessage.Body description: HTML representation of the content of the chat message. Representation is specified by the contentType inside the body. type: htmlBody - arguments: - description: The chat's unique identifier. name: chat_id required: true - description: HTML representation of the content of the chat message. Representation is specified by the contentType inside the body. name: body required: true description: Send a new message in a chat. name: msgraph-teams-send-message outputs: - contextPath: MSGraphTeamsChatMessage.ID description: The ID of the message. type: String - contextPath: MSGraphTeamsChatMessage.chatID description: The ID of the chat. type: String - contextPath: MSGraphTeamsChatMessage.From description: The Name of the sender of the chat message. type: String - contextPath: MSGraphTeamsChatMessage.Created description: Timestamp of when the chat message was created. type: Date - contextPath: MSGraphTeamsChatMessage.LastModifiedTime description: Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed. type: Date - contextPath: MSGraphTeamsChatMessage.Body description: HTML representation of the content of the chat message. Representation is specified by the contentType inside the body. type: htmlBody - arguments: [] description: Tests connectivity to Microsoft Graph Teams. name: msgraph-teams-test - description: Generate the login url used for Authorization code flow. name: msgraph-teams-generate-login-url arguments: [] - description: Run this command if for some reason you need to rerun the authentication process. name: msgraph-teams-auth-reset arguments: [] dockerimage: demisto/crypto:1.0.0.11658507 script: '' subtype: python3 type: python runonce: false fromversion: 6.0.0 tests: - No tests (auto formatted)