Automated Outlook / Hotmail registration and Microsoft Graph OAuth2 refresh_token collection (browser automation via patchright).
Community fork based on LainsNL/OutlookRegister.
This fork focuses on registration + OAuth2 hardening: recovery-email binding (optional), multi-stage login challenges, cookie-first OAuth, batching, and interrupt-safe summaries.
- Python 3.10+ recommended
- A working HTTP/SOCKS proxy (strongly recommended)
- Optional: a temp-mail / CF Temp Mail compatible API if you enable recovery-email binding
git clone <this-repo-url>
cd OutlookRegister
pip install -r requirements.txt
patchright install chromium# Windows
copy config.example.json config.json
# Linux / macOS
cp config.example.json config.jsonEdit config.json: set proxy at minimum. Leave secrets empty in any copy you publish.
python main.pySuccessful tokens are appended to Results/oauth2.txt:
email----password----client_id----refresh_token
Logs are written under log/. Press Ctrl+C to stop; the process writes a summary, then cleans browsers/profiles.
Ship template: config.example.json (same shape as the empty config.json).
| Field | Type | Description |
|---|---|---|
email_suffix |
string | Mail domain suffix used when generating accounts, e.g. @outlook.com or @hotmail.com. |
headless |
bool | false = show browser windows; true = headless. |
bot_protection_wait |
number | Base pacing for form fill (seconds). Code multiplies by 1000 for delays. |
max_captcha_retries |
number | Extra press/retry rounds for the press-and-hold captcha (about max_captcha_retries + 1 hold attempts). |
captcha_strategy |
number | Captcha / handoff mode (see table below). |
concurrent_flows |
number | Concurrent worker threads (parallel browsers). |
tasks |
number | Global cap on submitted tasks. Stops when this or success_tasks is reached (whichever first). |
success_tasks |
number | null | Global success cap. null = no success cap (still limited by tasks). |
batch_success_limit |
number | Successes per batch before resetting in-process proxy weights / stats and starting the next batch. Cumulative success/time keep counting. Does not change a fixed proxy’s real exit IP. |
proxy |
object | Proxy pool (required for real use). |
oauth2 |
object | Graph OAuth2 settings. |
temp_mail |
object | Optional recovery-email binding via temp-mail API. |
| Value | Behavior |
|---|---|
0 |
Fully automatic (captcha + mailbox + OAuth). |
1 |
Semi-automatic: you press captcha; rest automatic. |
2 |
Hand-off after captcha UI appears; no program OAuth for that task. |
| Field | Type | Description |
|---|---|---|
mode |
string | single = one port (single_port); multiple = port range port_start…port_end. |
type |
string | Proxy scheme, e.g. http, socks5. |
host |
string | Proxy host, e.g. 127.0.0.1. Fill this before running. |
single_port |
number | Port when mode is single. |
port_start |
number | First port when mode is multiple. |
port_end |
number | Last port when mode is multiple (inclusive). |
max_per_proxy |
number | Max times a port may be selected before it is skipped (usage counters reset when all ports are exhausted or a batch resets). |
| Field | Type | Description |
|---|---|---|
enable_oauth2 |
bool | If false, registration success alone counts without fetching tokens. |
client_id |
string | Azure/public client id used for authorize + token exchange. |
redirect_url |
string | Redirect URI registered for the client (default http://localhost). |
Scopes |
string[] | OAuth scopes, typically offline_access + Graph default. |
Used only if Microsoft shows “Help us protect your account” and binding is enabled.
| Field | Type | Description |
|---|---|---|
enabled |
bool | false = never auto-bind recovery mail (skip path when the page appears). |
base_url |
string | Temp-mail API base URL (your deployment). Leave empty if unused. |
admin_password |
string | Admin password for creating addresses. Do not publish. |
domain |
string | Mail domain for new addresses. |
name_prefix |
string | Optional local-part prefix. |
enable_prefix |
bool | Whether to apply name_prefix. |
code_timeout |
number | Seconds to wait for a verification code email. |
poll_interval |
number | Seconds between inbox polls. |
Generate email/password
-> open signup page
-> fill form
-> press-and-hold captcha
-> (optional) bind recovery email if Microsoft asks
-> enter Outlook mailbox
-> OAuth2 (cookie-first, then new browser with injected cookies)
-> append refresh_token to Results/oauth2.txt
OAuth handles common intermediate pages: personal/work account chooser, protect-account, email proof (or password path), KMSI “No”, consent, and code capture.
- Concurrent multi-proxy registration
- Batch success limit with in-process weight reset
- Cookie-first OAuth + cold/new-browser fallback with
storage_statewhen possible - Optional recovery-email binding via configurable temp-mail API
- Ctrl+C: write interrupt summary, then close browsers and clear profiles
- Failure breakdown and progress logs under
log/
- LainsNL/OutlookRegister — original project this fork is based on
- Microsoft identity platform / Graph — OAuth2 and Graph scopes
- patchright — browser automation
Distributed under the MIT License.
Attribution retained for upstream OutlookRegister and MIT-licensed portions this project builds on.
linux.do: Learn AI on L-Station!!!- Nodeseek.com: Nodeseek is a place for people who love web development, hosting, vps / server and other geek things.