The built in registration service will likely not be a good fit for what you are trying to do, that is, create new users on behalf of other people. This service (without required authentication) is generally used to allow new users to self service register a new account, which, if configured, their account will also come with a valid API key which you can expose to just their account via an authenticated service (that they can login)
If you want an ‘admin only’ create a new user on behalf of somebody else and fetch their API key to share, I would create your own dedicated service for this use and restrict it to Admin or whatever single role is applicable. You could still lock down the existing Register service or not register it at all. Alternatively locking down routes to require specific roles that you can assign as a manual/automated process. Eg users would get an API key but still wouldn’t be authorized to access services until the role was assigned.
What registration screen? the built in Swagger? Something you’ve built? If you’re trying to use the Swagger UI, you can use the
Authorize button at the top right before making the requests, which will require a valid API key.
Since you are getting a Basic Auth challenge, it is likely you have a BasicAuth provider also registered, and possible that the challenge is coming after a redirect. Without the ability to reproduce, I can only make suggestions based on assumptions. If you can put together a minimum reproduction of the issue in a GitHub repository and share it (removing any sensitive information), I’ll be happy to have a look at it.
Also, a good tool to test endpoints is Postman, this at least will help with the ability to provide exact details of request + response + path which will give a lot more context to the issue.