microsoft / microsoft/attacksimulationandtraining

Invoke-WebRequest error Parameter LandingPage is not be null Parameter loginPageId is not valid

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
16
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Hi, I have been using "AST Write Batch PS5.ps1" successfully, however it is throwing following error now.

image

PS C:\Users\administrator.CORE> $response = Invoke-WebRequest https://graph.microsoft.com/beta/security/attacksimulation/simulations -Method 'POST' -Headers $headerParams -Body $requestBody -TimeoutSec 120 Invoke-WebRequest: {"error":{"code":"UnknownError","message":"{\"Code\":400,\"Message\":\"Bad request\",\"Target\":null,\"Details\":[{\"Code\":400,\"Message\":\"Parameter LandingPage is not be null\",\"Target\":null,\"Details\":null,\"InnerError\":null},{\"Code\":400,\"Message\":\"Parameter landingPageId is not valid\",\"Target\":null,\"Details\":null,\"InnerError\":null},{\"Code\":400,\"Message\":\"Parameter LoginPage is not be null\",\"Target\":null,\"Details\":null,\"InnerError\":null},{\"Code\":400,\"Message\":\"Parameter loginPageId is not valid\",\"Target\":null,\"Details\":null,\"InnerError\":null}],\"InnerError\":null}","innerError":{"date":"2024-09-10T13:10:19","request-id":"af2c126b-b226-4ac4-8d30-152cf1e39c40","client-request-id":"af2c126b-b226-4ac4-8d30-152cf1e39c40"}}} PS C:\Users\administrator.CORE>

Any help on this would be much appreciated, thank you.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate AST Write Batch PS5.ps1 and trace the request sent to https://graph.microsoft.com/beta/security/attacksimulation/simulations, focusing on how $requestBody supplies landingPage and loginPage values. Compare that request with the current Attack Simulation Training API requirements and reproduce the validation error. Done should identify the cause and establish the appropriate script change or user guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.