microsoft / microsoft/attacksimulationandtraining
Invoke-WebRequest error Parameter LandingPage is not be null Parameter loginPageId is not valid
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.
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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