Keycloak get user credentials

Is there a way to retrieve the user’s password via API. I want to use the same user credentials to login to the other application. Below is the scenario:

  1. Login to App A
  2. After successful login to App A, it will then perform login to app B using direct access grants flow implemented via API