SupabaseS
Supabase•4y ago
Miguel

Insert many auth.users

Hey 👋

I would need to import many auth.users at once (we’re talking way above 10k each time).

Since the supabase.auth.admin API (createUser or inviteUserByEmail) does not allow to create more than one user at once, we were thinking of doing it through a RPC function and basically do an insert into auth.users ... that would work but the issue is that the uuid is required and it opens the risk that we randomly prepare an uuid already used by someone.

Are there better solutions to do something like this? Doing them one by one in a for loop would take too long…

Thanks!
Was this page helpful?