Skip to content

aad user hibp

Allows you to retrieve all accounts that have been pwned with the specified username

Usage

m365 aad user hibp [options]

Options

-n, --userName <userName>
The name of the user to retrieve information for.
--apiKey, <apiKey>
Have I been pwned API Key. You can buy it from https://haveibeenpwned.com/API/Key
--domain, [domain]
Limit the returned breaches only contain results with the domain specified.
-h, --help
output usage information
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Remarks

If the user with the specified user name doesn't involved in any breach, you will get a No pwnage found message when running in debug or verbose mode.

If API Key is invalid, you will get a Required option apiKey not specified error.

Examples

Check if user with user name account-exists@hibp-integration-tests.com is in a data breach

m365 aad user hibp --userName account-exists@hibp-integration-tests.com --apiKey _YOUR-API-KEY_

Check if user with user name account-exists@hibp-integration-tests.com is in a data breach against the domain specified

m365 aad user hibp --userName account-exists@hibp-integration-tests.com --apiKey _YOUR-API-KEY_ --domain adobe.com

More information