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.
Microsoft integrations (Graph and Azure) in Cortex XSOAR use Entra ID applications to authenticate with Microsoft APIs. These integrations use OAuth 2.0 and OpenID Connect standard-compliant authentication services, which use an Application to sign-in or delegate authentication. For more information, see the Microsoft identity platform overview. # Self-Deployed Application To use a [Self-Deployed Application](https://xsoar.pan.dev/docs/reference/articles/microsoft-integrations---authentication#self-deployed-application) , you need to add a [new Azure App Registration in the Azure Portal](https://docs.microsoft.com/en-us/graph/auth-register-app-v2#register-a-new-application-using-the-azure-portal). ### Authentication Using the User - Authorization Code Flow Follow these steps for [Authorization Code flow](https://xsoar.pan.dev/docs/reference/articles/microsoft-integrations---authentication#authorize-on-behalf-of-a-user) configuration: 1. To use a self-configured Azure application, you need to add a new Azure App Registration in the Azure Portal. To add the registration, refer to the following [Microsoft article](https://docs.microsoft.com/en-us/microsoft-365/security/defender/api-create-app-web?view=o365-worldwide#create-an-app) steps 1-8. 2. choose the user_auth_flow option in the ***Authentication Type*** parameter. 3. Enter your Client/Application ID in the ***Application ID*** parameter. 4. Enter your Client Secret in the ***Client Secret*** parameter. 5. Enter your Tenant ID in the ***Tenant ID*** parameter. 6. Enter your Application redirect URI in the ***Application redirect URI*** parameter. 7. Enter your Authorization code in the ***Authorization code*** parameter. 7. Save the instance. 8. Run the ***!msgraph-teams-test*** command - a 'Success' message should be printed to the War Room. ### 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 This is a long-running integration. For more information about long-running integrations, check out the <~XSIAM>[Forward requests to long-running integrations](https://docs-cortex.paloaltonetworks.com/r/Cortex-XSIAM/Cortex-XSIAM-Administrator-Guide/Forward-Requests-to-Long-Running-Integrations) article.</~XSIAM> <~XSOAR_SAAS>Forward Requests to Long-Running Integrations article: [Cortex XSOAR 8 Cloud](https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/8/Cortex-XSOAR-Cloud-Documentation/Forward-Requests-to-Long-Running-Integrations) or [Cortex XSOAR 8 On-prem](https://docs-cortex.paloaltonetworks.com/r/Cortex-XSOAR/8.7/Cortex-XSOAR-On-prem-Documentation/Integration-commands-in-the-CLI) documentation.</~XSOAR_SAAS>