Skip to content

Reduce redundant Microsoft Graph requests during Conditional Access collection - #195

Open
0xDarknightHacks wants to merge 1 commit into
silverhack:developfrom
0xDarknightHacks:perf/conditional-access-graph-requests
Open

0xDarknightHacks wants to merge 1 commit into
silverhack:developfrom
0xDarknightHacks:perf/conditional-access-graph-requests

Conversation

@0xDarknightHacks

Copy link
Copy Markdown

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:

  • Reduce unnecessary Graph calls during Conditional Access collection.
  • Preserve the existing collected data and assessment behavior.
  • Avoid changes to unrelated collectors or workloads.
  • Keep the change aligned with the current Monkey365 v1.0.0 codebase.

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.

@github-actions

Copy link
Copy Markdown
Contributor

Pull request targets main

This pull request cannot be merged because only the repository's
develop branch may be merged into main.

For a feature or bug fix, change the pull request's base branch to
develop. The maintainer will promote tested changes from develop
to main as part of the release process.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@0xDarknightHacks
0xDarknightHacks changed the base branch from main to develop September 26, 2026 20:56
@0xDarknightHacks
0xDarknightHacks force-pushed the perf/conditional-access-graph-requests branch from 027fa51 to bcfbdab Compare September 26, 2026 21:03

This branch has not been deployed

No deployments
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.

1 participant