Reduce redundant Microsoft Graph requests during Conditional Access collection - #195
Conversation
Pull request targets
|
Up to standards ✅🟢 Issues
|
027fa51 to
bcfbdab
Compare
|
Hi @0xDarknightHacks, thanks for submitting the pull request. The collector that makes use of this helper function never calls it with -Detailed anyway, but I agree with the change. That flag would just end up adding redundant queries. Thanks for taking the time to review it! I’ll get this merged ASAP. |
|
Thanks for pointing that out, and thanks for reviewing and merging this! I completely missed that the collector never actually calls the helper with That's a useful catch on my side as well, I'll make sure to trace the actual collector call paths more carefully before proposing any of the other optimizations I've been experimenting with. Really appreciate the feedback and the quick review! |
Context
While profiling Monkey365 during Microsoft 365 security assessments, I noticed redundant Microsoft Graph requests being made during Conditional Access collection.
This PR focuses only on reducing those unnecessary requests. The goal is to avoid retrieving data that has already been collected or is already available during the same assessment, while preserving the existing Conditional Access collection behavior and output.
This change originally came from performance work I was doing in my own fork of Monkey365. I am submitting it separately so the optimization can be reviewed independently rather than proposing the broader set of performance changes at once.
Description
This PR removes redundant Microsoft Graph requests from the Conditional Access collection path and reuses the data already available to the collector where applicable.
The scope is intentionally narrow:
This is a performance optimization rather than a fix for an existing reported issue, so there is no associated issue number.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.