Microsoft Teams

整合版本:23.0

本文提供相關指引,說明如何整合 Microsoft Teams 與 Google Security Operations (Google SecOps)。

設定 Microsoft Teams 整合功能,以便與 Google Security Operations 搭配使用

  1. 請確認用於整合設定的帳戶已啟用 Microsoft Teams 授權。如要這麼做,請前往 Microsoft 系統管理中心,並檢查套用至所需使用者的授權。

    Microsoft 系統管理中心 - 套用至 Microsoft Teams 使用者的授權

  2. 確認所需使用者擁有授權後,即可開始建立 Microsoft Teams 應用程式。首先,請前往「Azure Active Directory」>「App registrations」

    Microsoft 管理中心 - 應用程式註冊分頁

  3. 按一下「新增註冊」,然後提供:

    • Teams 應用程式的名稱
    • 重新導向 URI:「https://localhost」

    請務必將重新導向 URI 儲存到某處,因為後續程序會用到。

  4. 前往「總覽」頁面,然後複製:

    • 應用程式 (用戶端) ID:對應整合設定中的「Client ID」參數
    • 目錄 (租戶) ID:對應於整合設定中的「租戶」參數

    Microsoft 系統管理中心 - Microsoft Teams 總覽頁面

  5. 新增必要的權限。所有套用的權限都是「已委派」,應如下所示:

    新增必要的應用程式權限

    請務必以管理員身分同意授予權限。

  6. 前往「Certificates & secrets」分頁,然後新增用戶端密鑰。產生用戶端密鑰後,請從「值」欄複製資料。整合設定的「用戶端密鑰」參數需要這個值。

  7. 前往 Google SecOps SOAR 設定頁面,然後輸入下列參數:

    • 用戶端 ID
    • 用戶端密鑰
    • 重新導向 URI
    • 用戶群

    輸入「Refresh Token」參數的預留位置字串,然後儲存設定。

    初始 Microsoft Teams 整合設定

  8. 前往「案件」分頁並開啟任一案件。如果沒有保護殼,可以模擬保護殼。

    案件模擬

  9. 在案件中選取快訊,然後按一下「手動操作」

    快訊詳細資料窗格 -「專人介入處理」按鈕

  10. 前往 Microsoft Teams 整合服務,然後執行「取得授權」動作。這項動作會產生用於向應用程式驗證身分的連結。

    取得授權<0x0A>動作

  11. 如要查看結果,請前往「案件總覽」分頁,然後點選「查看結果」

    查看結果
按鈕

    您應該會看見類似下方的輸出內容:

    查看結果
輸出內容

  12. 點選動作提供的連結。請確認您登入的使用者帳戶是整合作業所用帳戶。在瀏覽器中開啟連結後,您會發現系統將您重新導向至其他頁面。這個頁面應如下所示: https://localhost/?code=0.ATwAylKP1BpbCEeO0…&session_state=a149d18b-4131-4649-8956-2f0d09a98743# Copy everything till "&session_state",例如: https://localhost/?code=0.ATwAylKP1BpbCEeO0…

  13. 執行「產生權杖」動作。

    產生權杖
動作

  14. 前往「案件總覽」分頁即可查看結果。輸出訊息中會顯示權杖。複製這個權杖,然後貼到「Refresh Token」參數中。

    取得授權動作 - 重新整理權杖
值

  15. 如果一切順利,您會看到綠色勾號。

    已完成 Microsoft Teams 整合設定

在 Google SecOps 中設定 Microsoft Teams 整合

如需在 Google SecOps 中設定整合功能的詳細操作說明,請參閱「設定整合功能」。

整合參數

請使用下列參數設定整合:

參數名稱 類型 預設 為必填項目 說明
執行個體名稱 字串 不適用 您要設定整合的執行個體名稱。
說明 字串 不適用 執行個體的說明。
用戶端 ID 字串 不適用 不適用
密鑰 ID 密碼 不適用 不適用
用戶群 字串 不適用 不適用
更新權杖 密碼 不適用 不適用
重新導向網址 字串 http://localhost 指定用於驗證整合的重新導向網址。預設值為 http://localhost。這項參數會影響「取得授權」和「產生權杖」動作。

動作

等待回覆

說明

動作會等待指定訊息中的預期回覆。

這項操作會以非同步方式執行。視需要調整 Google SecOps IDE 中動作的指令碼逾時值。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
小組名稱 字串 不適用 指定團隊名稱。
頻道名稱 字串 不適用 指定頻道名稱。
郵件 ID 字串 不適用 指定預期會收到回覆的訊息 ID。
預期的回覆 字串 不適用

指定預期回覆的文字。

如果未提供這個值,系統會在收到任何回覆時停止執行動作。

等待方法 DDL

查看第一則回覆

可能的值包括:

  • 查看第一則回覆
  • 等待逾時

指定動作的等待方法。

如果選取「檢查首次回覆」,動作會傳回首次回覆,或與預期值進行比較。

如果選取「Wait Till Timeout」,動作會等待預期值,直到達到逾時時間,或傳回逾時期間傳送的所有訊息。

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False

產生權杖

說明

使用上一步收到的授權網址取得存取權杖。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
授權網址 字串 不適用 使用上一步收到的授權網址要求存取權杖。

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_connected True/False is_connected:False

可取得授權作業

說明

執行動作,然後瀏覽收到的網址。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
重新導向網址 字串 不適用 使用上一步收到的授權網址要求存取權杖。

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_connected True/False is_connected:false

取得團隊 ID

說明

擷取特定團隊的屬性。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
小組名稱 字串 不適用 團隊名稱。

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False

取得使用者詳細資料

說明

擷取特定使用者的屬性和關係。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
使用者名稱 字串 不適用 Microsoft Teams 使用者名稱

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
JSON 結果
{
    "isResourceAccount": null,
    "mailNickname": "username.co#EXT#",
    "surname": null,
    "deletedDateTime": null,
    "assignedLicenses": [{
        "skuId": "16ddbbfc-09ea-4de2-b1d7-312db6112d70",
        "disabledPlans": []
    }],
    "userPrincipalName": "username.co#EXT#@tenant.onmicrosoft.com",
    "faxNumber": null,
    "consentProvidedForMinor": null,
    "userType": "Member",
    "officeLocation": null,
    "usageLocation": "IL",
    "city": null,
    "employeeId": null,
    "onPremisesImmutableId": null,
    "preferredLanguage": null,
    "streetAddress": null,
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#users/$entity",
    "id": "5e457a85-a705-4b65-8a9f-3a3d2ad7715c",
    "state": null,
    "businessPhones": [],
    "postalCode": null,
    "mail": "john_doe@example.com",
    "onPremisesSamAccountName": null,
    "onPremisesLastSyncDateTime": null,
    "accountEnabled": true,
    "mobilePhone": null,
    "refreshTokensValidFromDateTime": "2018-11-12T13:28:53Z",
    "companyName": null,
    "deviceKeys": [],
    "jobTitle": null,
    "preferredDataLocation": null,
    "showInAddressList": false,
    "department": null,
    "proxyAddresses": ["SMTP:mail"],
    "externalUserStateChangeDateTime": "2018-11-12T13:29:41Z",
    "onPremisesProvisioningErrors": [],
    "legalAgeGroupClassification": null,
    "onPremisesSyncEnabled": null,
    "onPremisesExtensionAttributes": {
        "extensionAttribute4": null,
        "extensionAttribute5": null,
        "extensionAttribute6": null,
        "extensionAttribute7": null,
        "extensionAttribute12": null,
        "extensionAttribute1": null,
        "extensionAttribute2": null,
        "extensionAttribute3": null,
        "extensionAttribute10": null,
        "extensionAttribute11": null,
        "extensionAttribute8": null,
        "extensionAttribute9": null,
        "extensionAttribute14": null,
        "extensionAttribute15": null,
        "extensionAttribute13": null
    },
    "assignedPlans": [{
        "capabilityStatus": "Enabled",
        "servicePlanId":
        "617d9209-3b90-4879-96e6-838c42b2701d",
        "service": "MicrosoftCommunicationsOnline",
        "assignedDateTime": "2018-11-12T13:28:57Z"
    }, {
        "capabilityStatus": "Enabled",
        "servicePlanId": "902b47e5-dcb2-4fdc-858b-c63a90a2bdb9",
        "service": "SharePoint",
        "assignedDateTime": "2018-11-12T13:28:57Z"
    }, {
        "capabilityStatus": "Enabled",
        "servicePlanId": "4fa4026d-ce74-4962-a151-8e96d57ea8e4",
        "service": "TeamspaceAPI",
        "assignedDateTime": "2018-11-12T13:28:57Z"
    }],
    "passwordProfile": null,
    "passwordPolicies": null,
    "externalUserState": "Accepted",
    "otherMails": ["mail"],
    "displayName": "name",
    "imAddresses": [],
    "provisionedPlans": [{
        "capabilityStatus": "Enabled",
        "provisioningStatus": "Success",
        "service": "SharePoint"
    }],
    "createdDateTime": "2018-11-12T13:28:53Z",
    "country": null,
    "onPremisesDistinguishedName": null,
    "onPremisesSecurityIdentifier": null,
    "onPremisesDomainName": null,
    "onPremisesUserPrincipalName": null,
    "givenName": null,
    "ageGroup": null
}

可列出頻道

說明

取得特定團隊中所有頻道的詳細資料。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
小組名稱 字串 不適用 團隊名稱。

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
all_channels_details 不適用 不適用

列出團隊

說明

擷取所有團隊的詳細資料。

參數

這項動作沒有輸入參數。

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
團隊 不適用 不適用
JSON 結果
[
    {
        "mailNickname": "Test",
        "classification": null,
        "deletedDateTime": null,
        "renewedDateTime": "2018-11-12T15:03:50Z",
        "onPremisesProvisioningErrors": [],
        "membershipRuleProcessingState": null,
        "preferredLanguage": null,
        "expirationDateTime": null,
        "id": "43b559d5-f63d-47dd-9e6c-b3470b6446ee",
        "theme": null,
        "preferredDataLocation": null,
        "mail": "john_doe@example.com",
        "membershipRule": null,
        "onPremisesLastSyncDateTime": null,
        "description": "Test",
        "securityEnabled": false,
        "proxyAddresses": ["SPO:SPO_eaf75319-582a-46cf-8812-9e787d757c4e@SPO_a4a936ec-735f-488a-bfc0-7665f87aab47", "SMTP:Test@tenant.onmicrosoft.com"],
        "visibility": "Public",
        "resourceProvisioningOptions": ["Team"],
        "displayName": "Test",
        "groupTypes": ["Unified"],
        "onPremisesSyncEnabled": null,
        "createdDateTime": "2018-11-12T15:03:50Z",
        "resourceBehaviorOptions": ["HideGroupInOutlook", "SubscribeMembersToCalendarEventsDisabled", "WelcomeEmailDisabled"],
        "onPremisesSecurityIdentifier": null,
        "mailEnabled": true
    }, {
        "mailNickname": "user",
        "classification": null,
        "deletedDateTime": null,
        "renewedDateTime": "2018-11-28T13:46:50Z",
        "onPremisesProvisioningErrors": [],
        "membershipRuleProcessingState": null,
        "preferredLanguage": null,
        "expirationDateTime": null,
        "id": "67149c85-7139-4062-bfae-059d18ee7e5d",
        "theme": null,
        "preferredDataLocation": null,
        "mail": "john_doe@example.com",
        "membershipRule": null,
        "onPremisesLastSyncDateTime": null,
        "description": "user",
        "securityEnabled": false, "proxyAddresses": ["SPO:SPO_781470a6-2db5-454d-a8e3-71752b3b829e@SPO_a4a936ec-735f-488a-bfc0-7665f87aab47", "SMTP:user@tenant.onmicrosoft.com"],
        "visibility": "Public",
        "resourceProvisioningOptions": ["Team"],
        "displayName": "user",
        "groupTypes": ["Unified"],
        "onPremisesSyncEnabled": null,
        "createdDateTime": "2018-11-28T13:46:50Z",
        "resourceBehaviorOptions": ["HideGroupInOutlook", "SubscribeMembersToCalendarEventsDisabled", "WelcomeEmailDisabled"],
        "onPremisesSecurityIdentifier": null,
        "mailEnabled": true
    }

將使用者列入清單

說明

取得所有使用者的詳細資料。

參數

這項動作沒有輸入參數。

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
使用者 不適用 不適用
JSON 結果
[{
    "mailNickname": "Test",
    "classification": null,
    "deletedDateTime": null,
    "renewedDateTime": "2018-11-12T15:03:50Z",
    "onPremisesProvisioningErrors": [],
    "membershipRuleProcessingState": null,
    "preferredLanguage": null,
    "expirationDateTime": null,
    "id": "43b559d5-f63d-47dd-9e6c-b3470b6446ee",
    "theme": null,
    "preferredDataLocation": null,
    "mail": "john_doe@example.com",
    "membershipRule": null,
    "onPremisesLastSyncDateTime": null,
    "description": "Test",
    "securityEnabled": false,
    "proxyAddresses": ["SPO:SPO_eaf75319-582a-46cf-8812-9e787d757c4e@SPO_a4a936ec-735f-488a-bfc0-7665f87aab47", "SMTP:Test@tenant.onmicrosoft.com"],
    "visibility": "Public",
    "resourceProvisioningOptions": ["Team"],
    "displayName": "Test",
    "groupTypes": ["Unified"],
    "onPremisesSyncEnabled": null,
    "createdDateTime": "2018-11-12T15:03:50Z",
    "resourceBehaviorOptions": ["HideGroupInOutlook", "SubscribeMembersToCalendarEventsDisabled", "WelcomeEmailDisabled"],
    "onPremisesSecurityIdentifier": null,
    "mailEnabled": true
}, {
    "mailNickname": "user",
    "classification": null,
    "deletedDateTime": null,
    "renewedDateTime": "2018-11-28T13:46:50Z",
    "onPremisesProvisioningErrors": [],
    "membershipRuleProcessingState": null,
    "preferredLanguage": null,
    "expirationDateTime": null,
    "id": "67149c85-7139-4062-bfae-059d18ee7e5d",
    "theme": null,
    "preferredDataLocation": null,
    "mail": "john_doe@example.com",
    "membershipRule": null,
    "onPremisesLastSyncDateTime": null,
    "description": "user",
    "securityEnabled": false,
    "proxyAddresses": ["SPO:SPO_781470a6-2db5-454d-a8e3-71752b3b829e@SPO_a4a936ec-735f-488a-bfc0-7665f87aab47", "SMTP:user@tenant.onmicrosoft.com"],
    "visibility": "Public",
    "resourceProvisioningOptions": ["Team"],
    "displayName": "user",
    "groupTypes": ["Unified"],
    "onPremisesSyncEnabled": null,
    "createdDateTime": "2018-11-28T13:46:50Z",
    "resourceBehaviorOptions": ["HideGroupInOutlook", "SubscribeMembersToCalendarEventsDisabled", "WelcomeEmailDisabled"],
    "onPremisesSecurityIdentifier": null,
    "mailEnabled": true
}]

乒乓

說明

測試連線。

參數

這項動作沒有輸入參數。

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_connected True/False is_connected:False

傳送訊息

說明

傳送訊息給特定管道。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
小組名稱 字串 不適用 團隊名稱。
頻道名稱 字串 不適用 頻道名稱。
訊息 字串 不適用

執行時間

這項操作會對所有實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
JSON 結果
[{
    "@odata.context":"https://graph.microsoft.com/beta/$metadata#teams('192c0699-fad2-4d02-88a2-84efd6369894')/channels('19%3Ae3acbb17a8754cae9df724f493b5342f%40thread.tacv2')/messages/$entity",
    "id":"1601372154742",
    "replyToId":null,
    "etag":"1601372154742",
    "messageType":"message",
    "createdDateTime":"2020-09-29T09:35:54.742Z",
    "lastModifiedDateTime":"2020-09-29T09:35:54.742Z",
    "lastEditedDateTime":null,
    "deletedDateTime":null,
    "subject":null,
    "summary":null,
    "chatId":null,
    "importance":"normal",
    "locale":"en-us",
    "webUrl":"https://teams.microsoft.com/l/message/19%3Ae3acbb17a8754cae9df724f493b5342f%40thread.tacv2/1601372154742?groupId=192c0699-fad2-4d02-88a2-84efd6369894&tenantId=d48f52ca-5b1a-4708-8ed0-ebb98a26a46a&createdTime=1601372154742&parentMessageId=1601372154742",
    "policyViolation":null,
    "from":{
        "application":null,
        "device":null,
        "conversation":null,
        "user":{
            "id":"b786d3cf-e97d-4511-b61c-0559e9f4da75",
            "displayName":"u05D2'u05D9u05D9u05DEu05E1 u05D1u05D5u05E0u05D3",
            "userIdentityType":"aadUser"
        }},
    "body":{
        "contentType":"text",
        "content":"Hello there"
    },
    "channelIdentity":{
        "teamId":"192c0699-fad2-4d02-88a2-84efd6369894",
        "channelId":"19:e3acbb17a8754cae9df724f493b5342f@thread.tacv2"
    },
    "attachments":[],
    "mentions":[],
    "reactions":[]
}]

傳送使用者訊息

說明

在 Microsoft Teams 中傳送即時通訊訊息給使用者。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
使用者 ID CSV 不適用

請以半形逗號分隔清單的形式,列出要傳送訊息的使用者 ID。

注意:這項動作會合併這個參數中提供的有效實體和值,並將訊息傳送給所有這些實體和值。

文字 字串 不適用 指定訊息內容。
等待回覆 核取方塊 已勾選 如果啟用這項設定,系統會等到所有實體都回覆後,才執行後續動作。
內容類型 DDL 已勾選 指定郵件的內容類型。
使用者選取 DDL

文字

可能的值包括:

  • 文字
  • HTML

來自實體和使用者 ID

可能的值包括:

  • 來自實體和使用者 ID
  • 來自實體
  • 來自使用者 ID

指定要為使用者採用的選取類型。

如果選取「From Entities & User Identifiers」(來自實體和使用者 ID),動作會同時搜尋相關實體和「User Identifiers」(使用者 ID) 參數中提供的值。

如果提供「來自實體」,動作只會使用相關實體,並忽略「使用者 ID」參數中提供的值。

如果選取「來自使用者 ID」,這項動作只會使用「使用者 ID」中的值,且「使用者 ID」參數會變成必填。

執行時間

這項動作會對下列實體執行:

  • 使用者名稱
  • 電子郵件地址

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
JSON 結果
{
    "id": "1632820681737",
    "replyToId": null,
    "etag": "1632820681737",
    "messageType": "message",
    "createdDateTime": "2021-09-28T09:18:01.737Z",
    "lastModifiedDateTime": "2021-09-28T09:18:01.737Z",
    "lastEditedDateTime": null,
    "deletedDateTime": null,
    "subject": null,
    "summary": null,
    "chatId": "19:5af81bea-9c9f-4f9f-8745-9df1fdba8e12_b786d3cf-e97d-4511-b61c-0559e9f4da75@unq.gbl.spaces",
    "importance": "normal",
    "locale": "en-us",
    "webUrl": null,
    "channelIdentity": null,
    "policyViolation": null,
    "from": {
        "application": null,
        "device": null,
        "user": {
            "id": "b786d3cf-e97d-4511-b61c-0559e9f4da75",
            "displayName": "ג'יימס בונד",
            "userIdentityType": "aadUser"
        }
    },
    "body": {
        "contentType": "text",
        "content": "qqq"
    },
    "attachments": [],
    "mentions": [],
    "reactions": []
}
案件總覽
結果類型 值/說明 類型
輸出訊息*

動作不應失敗,也不應停止執行應對手冊:


如果系統回報 201 狀態碼 (is_success = true): 「Successfully sent a message to the following users in Microsoft Teams: {entity.identifier}.」(已成功傳送訊息給 Microsoft Teams 中的下列使用者:{entity.identifier}。)

如果找不到與實體相關的即時通訊 (is_success = true): 「動作無法傳送訊息給 Microsoft Teams 中的下列使用者:{entity.identifier}。」

如果找不到與實體相關的所有對話 (is_success = false):「系統未在 Microsoft Teams 中傳送任何訊息給所提供的使用者。」

Async Message:

「等待下列使用者回覆:{entity.identifier}。」

動作應會失敗並停止執行應對手冊:

如果系統回報重大錯誤:「Error executing action "Send User Message". 原因:{0}''.format(error.Stacktrace)

如果逾時:「Error executing action "Send User Message". 原因:系統已傳送訊息,但在等待下列使用者回覆時,動作發生逾時情況:{entity.identifier}。請在 IDE 中增加逾時時間,然後再試一次。注意:如果重試,系統會再次傳送訊息。

一般

可建立頻道

說明

在 Microsoft Teams 中建立頻道。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
小組名稱 字串 不適用 指定要建立頻道的團隊名稱。
頻道名稱 字串 不適用 指定不重複的頻道名稱。
管道類型 DDL

標準

可能的值:

  • 標準
  • 私人
指定要建立的管道類型。所有團隊成員都能存取標準頻道,但必須將使用者新增至私密頻道,才能存取該頻道。
說明 字串 不適用 指定頻道的說明。

執行時間

這項操作不會對實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
JSON 結果
{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('c084d2c7-a7e6-47a5-921b-0c32c3ab41d1')/channels/$entity",
    "id": "19:92ce922c1790450fae81f6713dbffbe3@thread.tacv2",
    "createdDateTime": "2021-11-18T11:37:39.8186647Z",
    "displayName": "Architecturea Discussion",
    "description": null,
    "isFavoriteByDefault": false,
    "email": "",
    "webUrl": "https://teams.microsoft.com/l/channel/19%3a92ce922c1790450fae81f6713dbffbe3%40thread.tacv2/Architecturea+Discussion?groupId=c084d2c7-a7e6-47a5-921b-0c32c3ab41d1&tenantId=d48f52ca-5b1a-4708-8ed0-ebb98a26a46a",
    "membershipType": "standard"
}
案件總覽
結果類型 值/說明 類型
輸出訊息*

動作不應失敗,也不應停止執行應對手冊:


如果系統回報 201 狀態碼 (is_success = true):「已在 Microsoft Teams 的『{團隊名稱}』團隊中,成功建立『{頻道名稱}』頻道。」

動作應會失敗並停止執行應對手冊:

如果系統回報重大錯誤:「執行『建立頻道』動作時發生錯誤。原因:{0}''.format(error.Stacktrace)

如果找不到團隊:「Error executing action "Create Channel". 原因:在 Microsoft Teams 中找不到名稱為「{team, name}」的團隊。

如果系統回報 400 狀態碼:「執行動作『建立頻道』時發生錯誤。原因:{innerError/message}。

一般

刪除管道

說明

刪除 Microsoft Teams 中的頻道。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
小組名稱 字串 不適用 指定要刪除頻道的團隊名稱。
頻道名稱 字串 不適用 指定要刪除的頻道名稱。

執行時間

這項操作不會對實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
案件總覽
結果類型 值/說明 類型
輸出訊息*

動作不應失敗,也不應停止執行應對手冊:


如果回報 204 狀態碼 (is_success = true):「已成功刪除 Microsoft Teams 團隊『{team name}』中的頻道『{channel name}』」。

如果找不到頻道 (is_success = true):「頻道『{channel name}』在 Microsoft Teams 團隊『{team name}』中不存在。」

動作應會失敗並停止執行應對手冊:

如果系統回報重大錯誤:「執行『刪除頻道』動作時發生錯誤。原因:{0}''.format(error.Stacktrace)

如果找不到團隊:「Error executing action "Delete Channel". 原因:在 Microsoft Teams 中找不到名稱為「{team, name}」的團隊。

一般

將使用者新增至頻道

說明

在 Microsoft Teams 中將使用者新增至私人頻道。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
小組名稱 字串 不適用 指定要搜尋頻道的團隊名稱。
頻道名稱 字串 不適用 指定要新增使用者的頻道名稱。

執行時間

這項動作會對下列實體執行:

  • 使用者名稱
  • 電子郵件地址

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
案件總覽
結果類型 值/說明 類型
輸出訊息*

動作不應失敗,也不應停止執行應對手冊:


如果回報一個實體的 200 狀態碼 (is_success = true):「已成功將下列使用者從 Microsoft Teams 的『{團隊名稱}』團隊新增至『{頻道名稱}』頻道:{entity.identifier}」

如果找不到某個實體的使用者 (is_success = true):「Action wasn't able to find the following users in Microsoft Teams: {entity.identifier}」(動作無法在 Microsoft Teams 中找到下列使用者:{entity.identifier})

如果回報某個實體的 400 狀態碼 (is_success = true):「Action wasn't able to add the following users to the channel "{Channel Name}" from team "{team name}" in Microsoft Teams: {entity.identifier}。確認使用者是「{團隊名稱}」團隊的成員。

如果找不到所有使用者 (is_success = false):「None of the provided users were found in Microsoft Teams.」(Microsoft Teams 中找不到任何指定使用者。)

如果系統回報所有項目都出現 400 狀態碼 (is_success = false):「無法將提供的使用者從 Microsoft Teams 的『{團隊名稱}』團隊新增至『{頻道名稱}』頻道。確認使用者是「{團隊名稱}」團隊的成員。

動作應會失敗並停止執行應對手冊:

如果系統回報重大錯誤:「Error executing action "Add Users To Channel". 原因:{0}''.format(error.Stacktrace)

如果找不到團隊:「Error executing action "Add Users To Channel"。原因:在 Microsoft Teams 中找不到名稱為「{team, name}」的團隊。

如果找不到頻道:「Error executing action "Add Users To Channel". 原因:在 Microsoft Teams 中找不到名稱為「{channel name}」的頻道。

如果頻道的「membershipType」!=「private」:「Error executing action "Add Users To Channel". 原因:名稱為「{channel name}」的頻道並非私人頻道。

一般

從頻道中移除使用者

說明

從 Microsoft Teams 的私人頻道中移除使用者。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
小組名稱 字串 不適用 指定要搜尋頻道的團隊名稱。
頻道名稱 字串 不適用 指定要移除使用者的頻道名稱。

執行時間

這項動作會對下列實體執行:

  • 使用者名稱
  • 電子郵件地址 (符合電子郵件規則運算式的使用者名稱)

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
案件總覽
結果類型 值/說明 類型
輸出訊息*

動作不應失敗,也不應停止執行應對手冊:


如果回報某個實體的 201 狀態碼 (is_success = true):「已從 Microsoft Teams 團隊『{team name}』的頻道『{Channel Name}』中,成功移除下列使用者:{entity.identifier}」

如果使用者不是頻道成員 (is_success = true):「下列使用者原本就不是 Microsoft Teams 團隊『{team name}』中『{Channel Name}』頻道的成員:{entity.identifier}」

如果所有使用者都不是頻道成員 (is_success = true):「提供的使用者都不是 Microsoft Teams 中『{團隊名稱}』團隊的『{頻道名稱}』頻道成員。」

動作應會失敗並停止執行應對手冊:

如果系統回報重大錯誤:「執行『從頻道移除使用者』動作時發生錯誤。原因:{0}''.format(error.Stacktrace)

如果找不到團隊:「Error executing action "Remove Users To Channel". 原因:在 Microsoft Teams 中找不到名稱為「{team, name}」的團隊。

如果找不到頻道:「Error executing action "Remove Users From Channel". 原因:在 Microsoft Teams 中找不到名稱為「{channel name}」的頻道。

如果頻道的「membershipType」!=「private」:「執行『從頻道移除使用者』動作時發生錯誤。原因:名稱為「{channel name}」的頻道並非私人頻道。

一般

建立對話

說明

在 Microsoft Teams 中建立使用者對話。

參數

這項動作沒有輸入參數。

執行時間

這項動作會對下列實體執行:

  • 使用者名稱
  • 電子郵件地址 (符合電子郵件規則運算式的使用者名稱)

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
JSON 結果
{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats/$entity",
    "id": "19:b786d3cf-e97d-4511-b61c-0559e9f4da75_cb786032-1ba9-439a-b714-99286e185921@unq.gbl.spaces",
    "topic": null,
    "createdDateTime": "2021-10-13T11:24:15.696Z",
    "lastUpdatedDateTime": "2021-10-13T11:24:15.696Z",
    "chatType": "oneOnOne"
}
案件總覽
結果類型 值/說明 類型
輸出訊息*

動作不應失敗,也不應停止執行應對手冊:

如果回報 201 狀態碼 (is_success = true):「Successfully created chat with the following users in Microsoft Teams: {entities}」(已在 Microsoft Teams 中成功與下列使用者建立對話:{entities})

If 找不到使用者 (is_success = true):「Microsoft Teams 中找不到以下使用者:{entities}」

如果找不到所有使用者 (is_success = false):「None of the provided users were found in Microsoft Teams: {entities}」(Microsoft Teams 中找不到任何提供的使用者:{entities})

如果系統回報某個實體的 400 狀態碼 (is_success = true):「Action wasn't able to create a chat with the following users in Microsoft Teams: {entities}」(動作無法在 Microsoft Teams 中與下列使用者建立對話:{entities})

如果所有實體都回報 400 狀態碼 (is_success = false):「動作無法使用 Microsoft Teams 中提供的使用者建立對話。」

動作應會失敗並停止執行應對手冊:

如果系統回報嚴重錯誤:「執行『建立對話』動作時發生錯誤。原因:{0}''.format(error.Stacktrace)

一般

列出對話

說明

列出 Microsoft Teams 中可用的對話。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
即時通訊類型 DDL

全部

可能的值:

  • 全部
  • 群組通訊
  • 會議即時通訊
  • 一對一即時通訊
指定要傳回的對話類型。
篩選鍵 DDL

選取一個

可能的值:

  • 主題
  • 成員顯示名稱
  • 成員電子郵件
指定用來篩選對話的金鑰。
篩選邏輯 DDL

未指定

可能的值:

  • 未指定
  • 等於
  • 包含
指定要套用哪些篩選器邏輯。篩選邏輯會根據「篩選鍵」參數中提供的值運作。
篩選條件值 字串 不適用 指定篩選器中應使用的值。如果選取「等於」,動作會嘗試在結果中尋找完全相符的項目。如果選取「包含」,動作會嘗試尋找包含該子字串的結果。如果這個參數未提供任何內容,系統就不會套用篩選條件。篩選邏輯會根據「篩選鍵」參數中提供的值運作。
要傳回的記錄數量上限 整數 50 指定要傳回的記錄數。如未提供任何內容,動作會傳回 50 筆記錄。

執行時間

這項操作不會對實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
JSON 結果
{
    "id": "19:5af81bea-9c9f-4f9f-8745-9df1fdba8e12_b786d3cf-e97d-4511-b61c-0559e9f4da75@unq.gbl.spaces",
    "topic": null,
    "createdDateTime": "2021-04-12T08:36:52.572Z",
    "lastUpdatedDateTime": "2021-09-28T09:31:58.045Z",
    "chatType": "oneOnOne",
    "members@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3A5af81bea-9c9f-4f9f-8745-9df1fdba8e12_b786d3cf-e97d-4511-b61c-0559e9f4da75%40unq.gbl.spaces')/members",
    "members": [
        {
            "@odata.type": "#microsoft.graph.aadUserConversationMember",
            "id": "MCMjZDQ4ZjUyY2EtNWIxYS00NzA4LThlZDAtZWJiOThhMjZhNDZhIyMxOTo1YWY4MWJlYS05YzlmLTRmOWYtODc0NS05ZGYxZmRiYThlMTJfYjc4NmQzY2YtZTk3ZC00NTExLWI2MWMtMDU1OWU5ZjRkYTc1QHVucS5nYmwuc3BhY2VzIyM1YWY4MWJlYS05YzlmLTRmOWYtODc0NS05ZGYxZmRiYThlMTI=",
            "roles": [
                "Owner"
            ],
            "displayName": "yuriy",
            "visibleHistoryStartDateTime": "0001-01-01T00:00:00Z",
            "userId": "5af81bea-9c9f-4f9f-8745-9df1fdba8e12",
            "email": null,
            "tenantId": "d48f52ca-5b1a-4708-8ed0-ebb98a26a46a"
        },
        {
            "@odata.type": "#microsoft.graph.aadUserConversationMember",
            "id": "MCMjZDQ4ZjUyY2EtNWIxYS00NzA4LThlZDAtZWJiOThhMjZhNDZhIyMxOTo1YWY4MWJlYS05YzlmLTRmOWYtODc0NS05ZGYxZmRiYThlMTJfYjc4NmQzY2YtZTk3ZC00NTExLWI2MWMtMDU1OWU5ZjRkYTc1QHVucS5nYmwuc3BhY2VzIyNiNzg2ZDNjZi1lOTdkLTQ1MTEtYjYxYy0wNTU5ZTlmNGRhNzU=",
            "roles": [
                "Owner"
            ],
            "displayName": "ג'יימס בונד",
            "visibleHistoryStartDateTime": "0001-01-01T00:00:00Z",
            "userId": "b786d3cf-e97d-4511-b61c-0559e9f4da75",
            "email": "james.bond@siemplifycyarx.onmicrosoft.com",
            "tenantId": "d48f52ca-5b1a-4708-8ed0-ebb98a26a46a"
        }
    ]
}
案件總覽
結果類型 值/說明 類型
輸出訊息*

動作不應失敗,也不應停止執行應對手冊:

如果資料可用 (is_success = true):「Successfully found chats for the provided criteria in Microsoft Teams」(已在 Microsoft Teams 中,根據提供的條件成功找到對話)。

如果沒有可用資料 (is_success=false):「Microsoft Teams 中沒有符合所提供條件的對話。」

如果「篩選值」參數欄位空白 (is_success=true):

「篩選器未套用,因為參數『篩選器值』的值為空白。」

動作應會失敗並停止執行應對手冊:

如果「篩選鍵」參數設為「選取一項」,而「篩選邏輯」參數設為「等於」或「包含」:

「執行動作『{動作名稱}』時發生錯誤。原因:您需要從「篩選鍵」參數中選取欄位。

如果為「要傳回的最多記錄數」參數提供無效值:

「執行動作『{動作名稱}』時發生錯誤。原因:為「要傳回的記錄數上限」提供的值無效:。請提供正數。

如果發生重大錯誤,例如憑證錯誤、無法連線至伺服器或其他錯誤:

「執行動作『{動作名稱}』時發生錯誤。原因:{0}''.format(error.Stacktrace)

一般
案件總覽表格

表格名稱:可用的即時通訊

資料表資料欄:

  • ID - id
  • 類型 - chatType
  • 成員 - 成員/顯示名稱的 CSV 檔案
  • 名稱主題 - 主題
一般

傳送即時通訊訊息

說明

在 Microsoft Teams 中傳送即時通訊訊息。

參數

參數顯示名稱 類型 預設值 為必填項目 說明
即時通訊 ID DDL 不適用 指定要傳送訊息的對話 ID。
文字 字串 不適用 指定訊息內容。
等待回覆 核取方塊 已勾選 啟用後,動作會等待回覆。

執行時間

這項操作不會對實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
JSON 結果
{
    "id": "1632820681737",
    "replyToId": null,
    "etag": "1632820681737",
    "messageType": "message",
    "createdDateTime": "2021-09-28T09:18:01.737Z",
    "lastModifiedDateTime": "2021-09-28T09:18:01.737Z",
    "lastEditedDateTime": null,
    "deletedDateTime": null,
    "subject": null,
    "summary": null,
    "chatId": "19:5af81bea-9c9f-4f9f-8745-9df1fdba8e12_b786d3cf-e97d-4511-b61c-0559e9f4da75@unq.gbl.spaces",
    "importance": "normal",
    "locale": "en-us",
    "webUrl": null,
    "channelIdentity": null,
    "policyViolation": null,
    "from": {
        "application": null,
        "device": null,
        "user": {
            "id": "b786d3cf-e97d-4511-b61c-0559e9f4da75",
            "displayName": "ג'יימס בונד",
            "userIdentityType": "aadUser"
        }
    },
    "body": {
        "contentType": "text",
        "content": "qqq"
    },
    "attachments": [],
    "mentions": [],
    "reactions": []
}
案件總覽
結果類型 值/說明 類型
輸出訊息*

動作不應失敗,也不應停止執行應對手冊:

如果系統回報 201 狀態碼 (is_success = true):「Successfully sent a message in chat with ID {Chat ID} Microsoft Teams.」(已在 Microsoft Teams 中成功傳送 ID 為 {Chat ID} 的訊息)。

如果回覆可用 (is_success = true):「Successfully sent a message and received a reply in chat with ID {Chat ID} Microsoft Teams.」(已成功傳送訊息,並在 Microsoft Teams 的 ID 為 {Chat ID} 的對話中收到回覆。)

非同步訊息:等待回覆...

動作應會失敗並停止執行應對手冊:

如果系統回報嚴重錯誤:「執行動作『傳送即時通訊訊息』時發生錯誤。原因:{0}''.format(error.Stacktrace)

如果系統回報 404 狀態碼:「執行『傳送即時通訊訊息』動作時發生錯誤。原因:Microsoft Teams 中找不到具有該 ID 的對話。

如果逾時:「執行『傳送 Chat 訊息』動作時發生錯誤。」原因:訊息已傳送,但動作在等待回覆時逾時。請在 IDE 中增加逾時時間,然後再試一次。注意:如果重試,系統會傳送另一則訊息。

一般

傳送訊息回覆

說明

在 Microsoft Teams 中回覆頻道訊息。

參數

參數 類型 預設值 為必填項目 說明
小組名稱 字串 不適用 指定要將回覆傳送給哪個團隊。
頻道名稱 字串 不適用 指定要傳送回覆的管道。
郵件 ID 字串 不適用 指定要回覆的訊息 ID。
內容類型 DDL 文字

指定郵件的內容類型。

可能的值包括:

  • 文字
  • HTML

文字 字串 不適用 指定訊息內容。

執行時間

這項操作不會對實體執行。

動作執行結果

指令碼執行結果
指令碼結果名稱 值選項 範例
is_success True/False is_success:False
JSON 結果
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('192c0699-fad2-4d02-88a2-84efd6369894')/channels('19%3A4649fcf41fa5417f9aa78a5840bea442%40thread.tacv2')/messages('1686652339690')/replies/$entity",
"id": "1686653341151",
"replyToId": "1686652339690",
"etag": "1686653341151",
"messageType": "message",
"createdDateTime": "2023-06-13T10:49:01.151Z",
"lastModifiedDateTime": "2023-06-13T10:49:01.151Z",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": null,
"summary": null,
"chatId": null,
"importance": "normal",
"locale": "en-us",
"webUrl": "https://teams.microsoft.com/l/message/19%3A4649fcf41fa5417f9aa78a5840bea442%40thread.tacv2/1686653341151?groupId=192c0699-fad2-4d02-88a2-84efd6369894&tenantId=d48f52ca-5b1a-4708-8ed0-ebb98a26a46a&createdTime=1686653341151&parentMessageId=1686652339690",
"policyViolation": null,
"eventDetail": null,
"from": {
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "b786d3cf-e97d-4511-b61c-0559e9f4da75",
"displayName": "ג'יימס בונד",
"userIdentityType": "aadUser"
}
},
"body": {
"contentType": "text",
"content": "Reply"
},
"channelIdentity": {
"teamId": "192c0699-fad2-4d02-88a2-84efd6369894",
"channelId": "19:4649fcf41fa5417f9aa78a5840bea442@thread.tacv2"
},
"attachments": [],
"mentions": [],
"reactions": []
}
案件總覽
結果類型 值/說明 類型
輸出訊息* 動作不應失敗或停止劇本執行:

如果其中一個為 201 (is_success = true):
print "Successfully sent a reply to the message in Microsoft Teams."

動作應會失敗並停止執行劇本:
如果發生重大錯誤:
print "Error executing action "Send Message Reply". Reason: {0}''.format(error.Stacktrace)
If team not found:
print "Error executing action "Send Message Reply". 原因:Microsoft Teams 中找不到名稱為「{team name}」的團隊。請檢查拼字。
如果找不到管道:
print "Error executing action "Send Message Reply". 原因:在 Microsoft Teams 中找不到名稱為「{channel name}」的頻道。請檢查拼字。
如果回應中出現「error」:
print "Error executing action "Send Message Reply". 原因:{error.message}。
一般

工作

如要在 Google Security Operations 中設定工作,請前往「Response」>「Job Scheduler」

更新權杖續訂工作

更新權杖續約作業的目標是定期更新整合作業中使用的更新權杖。

根據預設,更新權杖每 90 天就會過期,因此整合功能會在過期後無法使用。建議每 7 或 14 天執行一次這項工作,確保重新整理權杖為最新狀態。

工作輸入內容

如要設定工作,請使用下列參數:

參數
登入 API 根層級 必要

用於透過 Microsoft Identity Platform 驗證的 API 根目錄。

預設值為 https://login.microsoftonline.com

API 根層級 必要

Microsoft Graph 執行個體的 API 根目錄。

預設值為 https://graph.microsoft.com

整合環境 選填

工作更新重新整理權杖的整合環境。

這個參數接受以半形逗號分隔的多個值。請將個別值括在引號內 (" ")。

還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。