Currently I am using the Management API (Create a Client) to create the application in Auth0. Even though the ClientIds are unique, I have some requirement to ensure the application name should not repeat (By this name we are enabling API access from the dashboard). So currently I am retrieving all application via pagination and checking whether the name is exist or not?
Is there any better way exists to ensure the uniqueness for the application name?
Hi @sacrateesn Welcome to Auth0 community. Unfortunately there is no api endpoint to check if a client with certain alias exists. Your best bet is to try to create one and if you get 409 status code then display the message to the user accordingly.
Begs the question though, how many clients are you expecting to create? and what is the use case that requires you to create a lot of clients?
Nearly I am expecting 3000 - 5000 applications will be created. The third party servers / machine has to access our resource servers (cloud-apis). For each applications, we will be creating an applications and details will be share with third-party to get the tokens.
I have requirement to add the readable identifier as claim like (“AppID”:“com.org.analytics.app”). so currently I am adding these names to metadata for each app.
So to avoid duplication across the clients, the app name and metadata will be some string identifier based on our standard. Currently i am looking for the possibilities to ensure the client name uniqueness
I can’t offer any solutions for this right now other than just handling 409 status codes in response while creating clients. I’ll let others to chime in if anyone has solved this by other means. I wouldn’t recommend polling GET /clients endpoint to get all existing clients list and checking for uniqueness. By doing that you would be using your management api rate limit quota and management api endpoints are not supposed to be use fo high frequency calls, just for CI/CD or general CRUD configurations stuff.