Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upsert support for bulk import of users #2922

Open
travisyoungapptegy opened this issue Nov 14, 2024 · 3 comments
Open

Upsert support for bulk import of users #2922

travisyoungapptegy opened this issue Nov 14, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@travisyoungapptegy
Copy link

travisyoungapptegy commented Nov 14, 2024

Upsert support for bulk import of users

Problem

We need to implement a feature where admin users can upload a CSV of users for a tenant and have them be upserted.
The problem is there is there is no api that can store a CSV, validate its content, upsert valid users and call a registered webhook with a summary of the result once it is done.

Solution

An api endpoint that can store a CSV, validate its content, upsert valid users and call a registered webhook with a summary of the result once it is done.

The format of the users file is less important than the upsert support. So if the file format is JSON, that's okay.

Alternatives/workarounds

The alternative is to write a process that loops through each record in the CSV file making an API call to create a user for each line, and handle creation errors by making a second API call to update the existing user. This would be ~2 calls per CSV record and could become a performance issue on a 10K record file.

Additional context

We have a large user base per tenant, some have up to 100K users. In our current process, we receive a user update file from our clients every day and we do not know if the user already exists or not in FusionAuth. We have performance concerns with the workaround described above.

Note: This issue is similar to this ticket -> #609

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

@mooreds mooreds added the enhancement New feature or request label Nov 18, 2024
@mooreds mooreds changed the title Bulk import users by CSV Upsert support for bulk import of users Nov 18, 2024
@mooreds
Copy link
Collaborator

mooreds commented Nov 18, 2024

Hi @travisyoungapptegy ! Thanks for the feature request.

I think what you are looking for is bulk upsert for importing users repeatedly, rather than only CSV support (which is currently present if you use the CSV import script).

Did I get that right?

@travisyoungapptegy
Copy link
Author

@mooreds - That is correct

@mooreds
Copy link
Collaborator

mooreds commented Nov 18, 2024

Thanks! I will leave my updated description then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants