Skip to main content
Version: 10.3

REST API authentication with enabled IDP

For working with REST API with an enabled Identity Provider (IDP), you cannot use your IDP ID or password. The recommended approach is to explicitly set passwords for users locally in Keycloak. Thus, users can log in to the user interface with their IDP credentials and log in via REST API with a local password set up in Keycloak.

To set up a password in Keycloak, follow the steps below:

  1. Go to Users, find the required user, click Edit.
  2. Go to the Credentials tab and specify a password for the user.

Though the approach above is preferrable since it provides better traceability of user actions, alternatively, you can create a separate user for REST API authentication as described below:

  1. Go to Users, click the Add user button, and specify all required parameters.
  2. On the Credentials tab, set a password for the user.
  3. On the Role Mappings tab, set an appropriate role.

Now that IDP is enabled explicitly, you can use the REST API user ID and password for REST API authentication.