Hi Sana,
I think it's easy to get an error due to the payload is quite big and you may be missing some of element of it.
I have tried from my end it can create the simulation.
Here is the details:-
- Endpoint URL with AttackSimulation.ReadWrite.All consent has been granted.
POST https://graph.microsoft.com/v1.0/security/attackSimulation/simulations
- The body payload
{
"attackTechnique": "attachmentMalware",
"attackType": "endpoint",
"automationId": "f6759752-f4cb-431a-a21d-078cf0b00ba3",
"completionDateTime": "2023-12-30T14:01:27.812Z",
"createdBy": {
"displayName": "Admin",
"email": "mohddiah@1cpzfr.onmicrosoft.com",
"id": "f6759752-f4cb-431a-a21d-078cf0b00ba4"
},
"createdDateTime": "2023-12-24T14:01:27.812Z",
"description": "Simulation Test calling from MS Graph API",
"displayName": "Simulation Test",
"durationInDays": "340",
"endUserNotificationSetting": {
"notificationPreference": "microsoft",
"positiveReinforcement": {
"defaultLanguage": "En",
"deliveryPreference": "deliverImmedietly"
},
"settingType": "noNotification"
},
"excludedAccountTarget": {
"type": "addressBook"
},
"id": "72328d46-de95-43e0-ad7d-d4f3ac34139b",
"includedAccountTarget": {
"type": "addressBook"
},
"isAutomated": true,
"lastModifiedBy": {
"displayName": "Admin",
"email": "mohddiah@1cpzfr.onmicrosoft.com",
"id": "f6759752-f4cb-431a-a21d-078cf0b00ba4"
},
"lastModifiedDateTime": "2023-12-25T14:01:27.812Z",
"launchDateTime": "2023-12-24T14:01:27.812Z",
"oAuthConsentAppDetail": {
"appScope": "unknown",
"displayLogo": "App display logo",
"displayName": "App name"
},
"payloadDeliveryPlatform": "email",
"report": {
"overview": {
"recommendedActions": [
{
"actionWebUrl": "http://www.url.com",
"potentialScoreImpact": "2",
"title": "Penetration Test Accessment"
}
],
"resolvedTargetsCount": "2",
"simulationEventsContent": {
"compromisedRate": "50",
"events": [
{
"count": "2",
"eventName": "Testing"
}
]
},
"trainingEventsContent": {
"assignedTrainingsInfos": [
{
"assignedUserCount": "10",
"completedUserCount": "10",
"displayName": "Test User"
}
],
"trainingsAssignedUserCount": "10"
}
},
"simulationUsers": [
{
"assignedTrainingsCount": "10",
"completedTrainingsCount": "12",
"compromisedDateTime": "2023-12-24T14:01:27.812Z",
"inProgressTrainingsCount": "5",
"isCompromised": true,
"reportedPhishDateTime": "2023-12-28T14:01:27.812Z",
"simulationEvents": [
{
"browser": "edge",
"eventDateTime": "2023-12-28T14:01:27.812Z",
"eventName": "Attacker",
"ipAddress": "10.1.1.0.1",
"osPlatformDeviceDetails": "windows"
}
],
"simulationUser": {
"displayName": "Tester",
"email": "mddiah@1cpzfr.onmicrosoft.com",
"userId": "f6759752-f4cb-431a-a21d-078cf0b00ba5"
},
"trainingEvents": [
{
"displayName": "Test Simulation",
"latestTrainingStatus": "unknown",
"trainingAssignedProperties": {
"browser": "edge",
"eventDateTime": "2023-12-28T14:01:27.812Z",
"eventName": "Attacker",
"ipAddress": "10.1.1.0.1",
"osPlatformDeviceDetails": "windows",
"potentialScoreImpact": 2
},
"trainingCompletedProperties": {
"browser": "edge",
"eventDateTime": "2023-12-28T14:01:27.812Z",
"eventName": "Attacker",
"ipAddress": "10.1.1.0.1",
"osPlatformDeviceDetails": "windows",
"potentialScoreImpact": 3
},
"trainingUpdatedProperties": {
"browser": "edge",
"eventDateTime": "2023-12-28T14:01:27.812Z",
"eventName": "Attacker",
"ipAddress": "10.1.1.0.1",
"osPlatformDeviceDetails": "windows",
"potentialScoreImpact": 4
}
}
]
}
]
},
"status": "unknown",
"trainingSetting": {
"settingType": "noTraining"
}
}
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".