Skip to content

Conversation

@maximelb
Copy link
Contributor

Summary

  • Fix malformed URL construction in Defender adapter that caused Microsoft API BadRequest errors
  • Replace manual percent-encoding with proper net/url package usage for correct OData filter query parameters
  • Resolves issue where datetime values included query parameter syntax (e.g., 2025-11-17T10:27:18.440439Z?$filter=createdDateTime)

Test plan

  • Deploy updated adapter and verify no more BadRequest errors from Microsoft Graph API
  • Confirm alerts are being fetched successfully with proper datetime filtering
  • Verify URL format: https://graph.microsoft.com/v1.0/security/alerts_v2?$filter=createdDateTime+ge+<timestamp>

🤖 Generated with Claude Code

maximelb and others added 4 commits November 17, 2025 10:40
The manual percent-encoding of query parameters caused malformed URLs where
the datetime value included query parameter syntax (e.g., '2025-11-17T10:27:18.440439Z?$filter=createdDateTime').
This resulted in Microsoft API BadRequest errors.

Replace manual string concatenation with proper net/url package usage to ensure
correct URL construction and parameter escaping.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@maximelb maximelb marked this pull request as ready for review December 1, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants