Hi guys, is it possible to create an unique auto-incremented identifier field for a user?
For example,
CUST2001
CUST2002
CUST2003
The use case is to display this identifier on invoices instead of using UUID
Hi guys, is it possible to create an unique auto-incremented identifier field for a user?
For example,
CUST2001
CUST2002
CUST2003
The use case is to display this identifier on invoices instead of using UUID
Just curious, why username isn’t enough?
Email is used as username in this case.
I’d add a custom attribute in “Realm settings” (there is a section “User profile”).
Then it depends.
If you have capability to add service provider into your Keycloak deployment:
You can implement event listener SPI according to the doc: Server Developer Guide that will fill this field correctly. Existing users I believe may be prefilled directly in the db.
If you don’t have capability to add service provider to your deployment of KC. Just use API to do it, but it will be certanly less sync, so you need to poll to get all new users or wait for them to authenticate into a relying party (final software users authenticate into) that you have access to the code base or plugining.
The doc is here: API Documentation
Thank you for your advice.