[New Module] Invoke-BlockedPasswordPol #34
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.
Grabs a portal token which can be used to list out any custom passwords that are being blocked. Also checks to see if that policy is enabled and displays related info. It does require at least the AuthenticationPolicyAdministrator role, testing was done as Global Administrator. It also requires the user is connectoed to Azure via Connect-AzAccount so it can run Get-AzContext, there might be a way to get that info into the Portal token request just using the GRAPH API but I only ever got authentication errors when doing so.
I think this is useful to Red Teams who are looking to password spray other accounts, this gives insight into the organization and will limit unnecessary password guesses. It could also be useful to auditors looking to help improve an organizations security as the custom password policy is able to be enabled on most EntraID subscriptions.