EntraMail is a PowerShell based tool for penetration testers and Red Teamers to enumerate user accounts within EntraID (Azure AD) environments. It uses multiple APIs to identify valid User Principal Names (UPNs) and provides detailed HTML reports. The tool offers flexible options for querying by first names, last names, usernames, and supports both single queries and bulk operations via files.
- Multiple Query Options: Supports querying by first name, last name, or full username, as well as bulk queries from files.
- Domain-Specific UPN Enumeration: Validate UPNs within a specific domain to identify active accounts in EntraID.
- Stop On First Match: Optionally stop searching after finding the first valid user to optimize large-scale enumeration efforts.
- Customizable Delays: Control the delay between requests to prevent rate-limiting or IP blocking.
- Detailed HTML Reporting: Generate comprehensive, user-friendly HTML reports of the results.
- Flexible Input Sources: Accepts individual names or files containing multiple names or usernames for streamlined bulk enumeration.
- PowerShell 5.0 or higher
# Load The Script
Import-Module .\EntraMail.psm1
# Searching by single first name and last name
Invoke-EntraMail -FirstName Shaked -LastName Wiessman -DomainName domain.co.il
# Searching by Names-File it is recommended to use -StopOnFirstMatch flag
Invoke-EntraMail -NamesFile names.txt -DomainName domain.co.il -StopOnFirstMatch
# Searching by NUserNames File
Invoke-EntraMail -UsernameFile usernames.txt -DomainName domain.co.il -OutputFilePath report.html
# Convert NamesFile to UserNames File :
Invoke-EntraMail -ConvertNameFile names.txt -Style firstl