Skip to content

Conversation

@socketz
Copy link

@socketz socketz commented Nov 7, 2025

This pull request updates MSOLSpray to improve support for Microsoft Entra ID (formerly Azure AD), adds new usability features, and enhances error handling and reporting. The changes include rebranding references to Microsoft Entra ID, new parameters for targeting specific tenants, adding request delays, and more granular error output for troubleshooting.

Rebranding and Documentation Updates:

  • Updated all references in MSOLSpray.ps1 and README.md from "Azure/O365" to "Microsoft Entra ID/Azure AD/O365" and clarified error code documentation links. [1] [2] [3] [4]

New Features and Parameters:

  • Added TenantId, Delay, and VerboseErrors parameters to Invoke-MSOLSpray, allowing users to target a specific tenant, control request pacing to avoid lockouts, and display detailed error output for troubleshooting. [1] [2] [3] [4]

Input Validation and Usability Enhancements:

  • Implemented input validation for required parameters and file existence, and improved output messaging to guide users.

Expanded Error Handling:

  • Added handling for additional Microsoft Entra ID error codes, including password reset requirements, token revocation, Conditional Access blocks, MFA onboarding, and more, with clear output for each scenario. [1] [2]

Request Logic Improvements:

  • Updated request logic to use the specified TenantId in authentication requests and added support for delays between requests to help avoid rate limiting and Smart Lockout. [1] [2] [3]

These updates make the tool more robust, user-friendly, and better aligned with current Microsoft identity terminology and practices.

This pull request probably fixes all the pending issues and previous pull requests not approved yet.

Copilot AI and others added 11 commits November 7, 2025 17:08
Co-authored-by: socketz <638274+socketz@users.noreply.github.com>
Co-authored-by: socketz <638274+socketz@users.noreply.github.com>
Co-authored-by: socketz <638274+socketz@users.noreply.github.com>
… logic

Co-authored-by: socketz <638274+socketz@users.noreply.github.com>
…ovements

Modernize MSOLSpray for Microsoft Entra ID with enhanced error handling and rate limiting
…nvalid passwords

Co-authored-by: socketz <638274+socketz@users.noreply.github.com>
Co-authored-by: socketz <638274+socketz@users.noreply.github.com>
Co-authored-by: socketz <638274+socketz@users.noreply.github.com>
…quests

Integrate upstream PRs: Add TenantID parameter and improve MFA detection
Copilot AI review requested due to automatic review settings November 7, 2025 17:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the MSOLSpray tool by updating terminology from "Azure AD" to "Microsoft Entra ID" (reflecting Microsoft's rebranding), adding new functionality for better control over password spraying operations, and expanding error code handling for more comprehensive reconnaissance capabilities.

Key changes:

  • Adds three new parameters: TenantId (for targeting specific tenants), Delay (for rate limiting), and VerboseErrors (for troubleshooting)
  • Implements input validation for required parameters and file existence
  • Expands error code handling to cover 8 additional scenarios (AADSTS50056, AADSTS50173, AADSTS53003, AADSTS50072, AADSTS50074, AADSTS700016, AADSTS90019, AADSTS81018)
  • Separates AADSTS50079 from AADSTS50076 for more precise MFA state detection

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
README.md Updates terminology to Microsoft Entra ID and documents the three new parameters (TenantId, Delay, VerboseErrors)
MSOLSpray.ps1 Implements new parameters, adds comprehensive input validation, expands error handling with 8 new error codes, updates authentication endpoint to use TenantId variable, adds delay logic between requests, and updates documentation URLs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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