Bulk Registering Existing Users to New Applications in FusionAuth
-
Current state:
- There is one application: app1.
- We are adding a new application: app2.
- There are 200 users registered to app1.
- New users will be programmatically registered to both app1 and app2.
For the existing 200 users, we would like to register them to both app1 and app2.
Questions:
- Does FusionAuth provide the ability to bulk register existing users to another application (app2)?
- What is the best practice for handling such scenarios to avoid performing this as a manual "one-time" activity in the future?
-
- Bulk Registration of Existing Users:
FusionAuth does not currently provide a bulk endpoint for creating user registrations. However, you can achieve this by using the Create User Registration API to programmatically register users to app2. This requires iterating through the list of existing users and making an API call for each user to add the new registration. - Best Practices for Future Scenarios:
To avoid manual one-time activities like this in the future, consider the following approaches:- Enable Self-Service Registration:
If you are using FusionAuth's hosted login pages for user sign-ins, you can enable self-service registration for app2. With this feature, a user will automatically have a registration created for app2 when they attempt to log in for the first time. - Programmatic Registration:
Implement a workflow in your onboarding process that ensures users are automatically registered to all relevant applications when they are created or updated in your system. - Custom Scripts for Batch Processing:
Write a script to fetch all existing users and register them to any new applications as needed. This can be reused whenever new applications are added to your system.
- Enable Self-Service Registration:
References:
These steps should help streamline your workflow and reduce manual intervention for future scenarios.
- Bulk Registration of Existing Users:
-