创建模拟

命名空间:microsoft.graph

重要

Microsoft Graph /beta 版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。

为租户创建攻击模拟市场活动。

API 可用性

此 API 可用于以下国家级云部署。

全局服务 美国政府 L4 美国政府 L5 (DOD) 由世纪互联运营的中国
✅ ❌ ❌ ❌

权限

为此 API 选择标记为最低特权的权限。 只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。

权限类型 最低特权权限 更高特权权限
委派(工作或学校帐户) AttackSimulation.ReadWrite.All 不可用。
委派(个人 Microsoft 帐户) 不支持。 不支持。
应用程序 AttackSimulation.ReadWrite.All 不可用。

HTTP 请求

POST /security/attackSimulation/simulations

请求标头

标头 值
Authorization 持有者 {token}。 必填。 详细了解 身份验证和授权。
Content-Type application/json

请求正文

在请求正文中,提供 模拟 对象的 JSON 表示形式。

下表列出了创建模拟时所需的属性。

属性 类型 说明
attackTechnique simulationAttackTechnique 攻击模拟和训练活动中使用的社会工程技术。 支持 $filter 和 $orderby。 可能的值为:unknown、、credentialHarvesting、。 driveByUrlphishTrainingattachmentMalwarelinkInAttachmentlinkToMalwareFileunknownFutureValueoAuthConsentGrant 使用 Prefer: include-unknown-enum-members 请求标头从这个 可进化的枚举中获取以下值: oAuthConsentGrant, phishTraining. 有关社交工程攻击技术类型的详细信息,请参阅 模拟。
attackType simulationAttackType 攻击模拟和训练活动的攻击类型。 支持 $filter 和 $orderby。 可能的值包括 unknown、social、cloud、endpoint、unknownFutureValue。
createdBy emailIdentity 创建攻击模拟和训练市场活动的用户的标识。
displayName String 显示攻击模拟和训练市场活动的名称。 支持 $filter 和 $orderby。
durationInDays Int32 模拟持续时间(以天为单位)。 可选。
endUserNotificationSetting endUserNotificationSetting 攻击模拟和训练市场活动的最终用户通知设置。
includedAccountTarget accountTargetContent 模拟中的目标用户。
landingPage landingPage 与攻击模拟和训练活动关联的登陆页面。
lastModifiedBy emailIdentity 最近修改攻击模拟和训练市场活动的用户的标识。
launchDateTime DateTimeOffset 攻击模拟和训练活动的启动/开始的日期和时间。 支持 $filter 和 $orderby。 时间戳使用 ISO 8601 格式表示日期和时间信息,并且始终采用 UTC 格式。 例如,2014 年 1 月 1 日午夜 UTC 为 2014-01-01T00:00:00Z。
loginPage loginPage 与攻击模拟和训练活动关联的登录页面。
oAuthConsentAppDetail oAuthConsentAppDetail 技术所需的 oAuthConsentGrant 详细信息。
payload 有效负载 与攻击模拟和训练活动关联的有效负载。
payloadDeliveryPlatform payloadDeliveryPlatform 攻击模拟和训练活动中使用的网络钓鱼有效负载的交付方法。 可能的值包括 unknown、sms、email、teams、unknownFutureValue。
status simulationStatus 攻击模拟和训练活动的状态。 支持 $filter 和 $orderby。 可能的值为:unknown、、draft、。 scheduledunknownFutureValuerunningsucceededfailedcancelledexcluded
trainingSetting trainingSetting 攻击模拟和训练活动的训练设置。

响应

如果成功,此方法将返回响应 202 Accepted 代码和响应中命名的 location 跟踪标头。

示例

请求

以下示例显示了一个请求。

POST https://graph.microsoft.com/beta/security/attackSimulation/simulations
Content-type: application/json

{
  "displayName": "Graph Simulation",
  "payload@odata.bind": "https://graph.microsoft.com/beta/security/attacksimulation/payloads/12345678-9abc-def0-123456789a",
  "loginPage@odata.bind": "https://graph.microsoft.com/beta/security/attacksimulation/loginPages/1w345678-9abc-def0-123456789a",
  "landingPage@odata.bind": "https://graph.microsoft.com/beta/security/attacksimulation/landingPages/1c345678-9abc-def0-123456789a",
  "createdBy": {
    "email": "john@contoso.com"
  },
  "durationInDays": "3",
  "attackTechnique": "credentialHarvesting",
  "status": "scheduled",
  "includedAccountTarget": {
    "@odata.type": "#microsoft.graph.addressBookAccountTargetContent",
    "type": "addressBook",
    "accountTargetEmails": [
      "john@contoso.com"
    ]
  },
  "trainingSetting": {
    "settingType": "noTraining"
  },
  "endUserNotificationSetting": {
    "notificationPreference": "microsoft",
    "settingType": "noTraining",
    "positiveReinforcement": {
      "deliveryPreference": "deliverAfterCampaignEnd",
      "endUserNotification@odata.bind": "https://graph.microsoft.com/beta/security/attacksimulation/endUserNotifications/1ewer3678-9abc-def0-123456789a",
      "defaultLanguage": "en"
    },
    "simulationNotification": {
      "targettedUserType": "compromised",
      "endUserNotification@odata.bind": "https://graph.microsoft.com/beta/security/attacksimulation/endUserNotifications/12wer3678-9abc-def0-123456789a",
      "defaultLanguage": "en"
    }
  }
}

响应

以下示例显示了相应的响应。

HTTP/1.1 202 Accepted