I have setup an identity provider and via the UI it works fine. After redirection to azure I can login and keycloak generates an access token. I want to do the same via CLI.
I tried with this command:
curl --location --request POST ‘https:///realms//protocol/openid-connect/token’
–header ‘Content-Type: application/x-www-form-urlencoded’
–data-urlencode ‘grant_type=password’
–data-urlencode ‘client_id=’
–data-urlencode ‘client_secret=’
–data-urlencode ‘username=’
–data-urlencode ‘password=’
–data-urlencode ‘kc_idp_hint=’
I get the following: error “invalid_user_credentials”,
There is no way to do that using the Resource Owner Password Credential (ROPC). To login in Azure, KC is integrated with Azure (Identity Brokering) implementing the Authorization Code flow (Browsed-Based authentication). Please review the OAuth 2.0 [1] standard.