I am trying to authenticate users using grant_type=password for a client and also I assigned the create client, manage client in the service account roles section but still I am not able to create/register a new client. Please advise.
Are you creating the client using the admin API, or are you trying to use the OIDC Dynamic Client Registration endpoint? If the latter, you have to create an initial access token. Go to “Realm settings”->”Client Registration” to do that.
I see. Thanks for the additional context. I didn’t understand you were doing a token exchange from a user to a service account. Does the service account for AppAdmin have the right roles specified in “Service Account Roles” also? That’s usually the problem that yields the insufficient_scope error.