Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidUserNameOrPassword #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions MSOLSpray.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,13 @@
# Here is a referense list of all the Azure AD Authentication an Authorization Error Codes:
# https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-aadsts-error-codes

# Standard invalid password
# Standard invalid password
# my modifications here
If($RespErr -match "AADSTS50126")
{
continue
#Write the accounts that result in the AADSTS error code AADSTS50126 (InvalidUserNameOrPassword) to both the screen as well as to the log file when using the -Outfile parameter.
Write-Host -ForegroundColor "yellow" "[*] WARNING! Valid user, but invalid password for $username."
$fullresults += "Valid user, but invalid password : $username"
}

# Invalid Tenant Response
Expand Down