Bulk delete for users/clients/resource-servers/client-grants/device-credentials/connections
--- H A N D L E - W I T H - C A R E ! ---
./bulk-delete.js --help
Usage: bulk-delete.js --mode=[users|clients|resource-servers|device-credentials|
client-grants|connections] --concurrent=[num|5] --delay=[num|333]
--retry=[num|3]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--mode Entity type you want to delete [string] [required]
--prompt Show warning prompt [boolean] [default: true]
--concurrent Max concurrent reqs (1..20) [number] [default: 5]
--delay Min delay (ms) betn reqs (300..3000) [number] [default: 333]
--retry Num retries for HTTP429 reqs (1..5) [number] [default: 3]
- Copy .env.sample to .env and complete it by entering required values as follows.
# auth0 tenant (ex. my-tenant.au.auth0.com)
AUTH0_DOMAIN=
# credentials for M2M app with scope delete:<users|clients|resource_servers|device_credentials|client_grants|connections>
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
- IDs for entities to be deleted must be provided in
entity_ids.delete
file. - Type of the entity to be deleted must be provided as
mode
cli argument (this is the only REQUIRED arg). - Provide values for
concurrent
anddelay
args suitable to rate-limits on your tenant. - In spite of the above, if we hit HTTP 429 (rate limit exceeded) error, then script will retry for
retry
number of times. - In spite of retries, if a particular request(s) fails, it will be logged in
failures.log
file and can be re-attempted later.