Conversation
…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>
Copilot
AI
changed the title
[WIP] Fix issues and add unapproved pull requests
Integrate upstream PRs: Add TenantID parameter and improve MFA detection
Nov 7, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for targeting specific Azure AD/Entra ID tenants during password spraying operations and improves MFA status detection by distinguishing between active MFA enforcement and MFA registration eligibility.
- Added a new
TenantIdparameter (defaults to "common") to enable authentication against specific tenants, useful for B2B scenarios - Split MFA error code handling to differentiate between active MFA (AADSTS50076) and MFA onboarding availability (AADSTS50079)
- Updated parameter positions to accommodate the new TenantId parameter
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Added documentation for the new TenantId parameter in the options list |
| MSOLSpray.ps1 | Added TenantId parameter, integrated it into the OAuth2 URL construction, separated MFA error codes for clearer status reporting, and renumbered subsequent parameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
socketz
approved these changes
Nov 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
Integrated three high-value upstream pull requests while avoiding duplication of features already present from the previously merged Entra ID improvements PR.
New capabilities:
Already present (from prior merge, not re-implemented):
Motivation
Addresses issues and unapproved PRs from upstream dafthack/MSOLSpray repository (dafthack#17, dafthack#13, dafthack#9). The TenantID parameter specifically solves authentication challenges with B2B guest accounts that exist in multiple tenants.
Type of change
Feature request
Checklist
git pull --rebase upstream main).Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.