microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Geo Location in Alert Evidence breaks Json structure
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Describe the bug
When retrieving alerts from the Security endpoint. The following Security.ipEvidence breaks the Json Structure. As the longtitude contains a comma and is not quoted.
{
"@odata.type": "#microsoft.graph.security.ipEvidence",
"ipAddress": "52.163.67.31",
"countryLetterCode": "SG",
"location": {
"countryName": "Singapore",
"state": "Central Singapore",
"city": "Singapore",
"longitude": 1,038518E+07,
"latitude": 128795
},
Expected behavior
Quote the longitude value or handle longtitude as another data type
How to reproduce
Create a json alert object, including the following information
{
"@odata.type": "#microsoft.graph.security.ipEvidence",
"ipAddress": "52.163.67.31",
"countryLetterCode": "SG",
"location": {
"countryName": "Singapore",
"state": "Central Singapore",
"city": "Singapore",
"longitude": 1,038518E+07,
"latitude": 128795
},
SDK Version
Microsoft.Graph.Security 2
Latest version known to work for scenario above?
2.20.0 and 2.23.0
Known Workarounds
Replacing the Longtitude value manually if it exists
Debug output
Click to expand log
```</details>
### Configuration
Name Value ---- ----- PSVersion 5.1.17763.6530 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17763.6530 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
### Other information
_No response_
Contributor guide
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
Reproduce the issue through the Microsoft Graph Security endpoint using the provided ipEvidence JSON and the Microsoft.Graph.Security SDK. Check how the longitude value is parsed or serialized, compare behavior with SDK versions 2.20.0 and 2.23.0, and confirm that the resulting alert data remains valid JSON without requiring manual replacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100