cannot get account targets from Get-MgBetaSecurityAttackSimulationTrainingCampaign
Dear all,
I’m trying to read (and later modify) Microsoft Defender Attack Simulation Training Campaigns. There is an Microsoft Graph BETA(!) API available.
When I query list of training campaigns with
Get-MgBetaSecurityAttackSimulationTrainingCampaign
I get the list of campaigns I also can see in Microsoft Defender Web-UI.
When I query more details for a specific training campaign with
Get-MgBetaSecurityAttackSimulationTrainingCampaign -TrainingCampaignId MY-TRAINING-IDI get a result like thisCampaignSchedule : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphCampaignSchedule
CreatedBy : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphEmailIdentity
CreatedDateTime : 7/8/2024 1:55:57 PM
Description :
DisplayName : 2024-07 – Basic IT security training for regular users
EndUserNotificationSetting : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphEndUserNotificationSetting
ExcludedAccountTarget : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAccountTargetContent
Id : 11111111-2222-3333-4444-555555555
IncludedAccountTarget : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAccountTargetContent
LastModifiedBy : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphEmailIdentity
LastModifiedDateTime : 7/8/2024 3:20:25 PM
Report : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTrainingCampaignReport
TrainingSetting : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTrainingSetting
AdditionalProperties : {[@odata.context,
https://graph.microsoft.com/beta/$metadata#security/attackSimulation/trainingCampaigns/$entity]}
I was not able to get any results for IncludedAccountTarget or any other object. Neither with ForEach-Object nor anything else.
Any idea? Any hint?
Thank you so much for your help!
Best regards
Daniel
Dear all,I’m trying to read (and later modify) Microsoft Defender Attack Simulation Training Campaigns. There is an Microsoft Graph BETA(!) API available. When I query list of training campaigns withGet-MgBetaSecurityAttackSimulationTrainingCampaign I get the list of campaigns I also can see in Microsoft Defender Web-UI. When I query more details for a specific training campaign with Get-MgBetaSecurityAttackSimulationTrainingCampaign -TrainingCampaignId MY-TRAINING-IDI get a result like thisCampaignSchedule : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphCampaignScheduleCreatedBy : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphEmailIdentityCreatedDateTime : 7/8/2024 1:55:57 PMDescription :DisplayName : 2024-07 – Basic IT security training for regular usersEndUserNotificationSetting : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphEndUserNotificationSettingExcludedAccountTarget : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAccountTargetContentId : 11111111-2222-3333-4444-555555555IncludedAccountTarget : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAccountTargetContentLastModifiedBy : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphEmailIdentityLastModifiedDateTime : 7/8/2024 3:20:25 PMReport : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTrainingCampaignReportTrainingSetting : Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTrainingSettingAdditionalProperties : {[@odata.context,https://graph.microsoft.com/beta/$metadata#security/attackSimulation/trainingCampaigns/$entity]} I was not able to get any results for IncludedAccountTarget or any other object. Neither with ForEach-Object nor anything else. Any idea? Any hint? Thank you so much for your help!Best regardsDaniel Read More