auth_users_import
Upserts a batch of users, with their provider identities, into the auth schema of the Product database, keeping each id, email, password hash, confirmation time, timestamps and metadata, so nobody has to reset a password. Hashes must be bcrypt ($2a$, $2b$, $2y$) or argon2 ($argon2i$, $argon2id$); scrypt and anything else is refused, naming the row. Idempotent on id: running a batch twice changes nothing the second time. Up to 200 users per call. Hashes are never logged and never returned; the response carries counts only. Compare them with auth_get to verify a migration.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"productId": "<productId>",
"users": "<users>"
},
"name": "auth_users_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| users | Yes | Field names follow the auth.users columns, so an export from a Supabase or GoTrue database maps straight across. | |
| confirm | No | Required for destructive operations. Without it a destructive call returns its plan and refuses, exactly as dry_run would. | |
| dry_run | No | Return the plan without applying it: the resources it would create, change or destroy, and an estimated monthly cost. Free, and has no side effects. Call this before any change you have not made before. | |
| productId | Yes | Product identifier, e.g. prd_7k2m9x4qw1nv8bz3ct6d. | |
| environment | No | Environment within a Product. Every Product has production; preview and development are optional. pr-<number> is the preview of an open pull request, made and removed by the GitHub integration on Pro. | |
| idempotency_key | No | Replaying the same key returns the original result instead of acting twice. Strongly recommended for anything that creates a resource or spends money. |