Unable to create client in esignet

Hi team,

I am unable to create client in esignet. Below is the steps I am following.

I am able to get access key from keycloak

--url http://<keycloak host>/auth/realms/mosip/protocol/openid-connect/token \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data client_secret=<pms client secret> \
  --data client_id=mosip-pms-client \
  --data grant_type=client_credentials

And I am getting the csrf token from /v1/esignet/csrf/token end point. I am calling the /v1/esignet/client-mgmt/oidc-client api using the access_token which I got from the first curl and csrf token from the second api.

I am getting 401

Hello @Vijay_S

Can you confirm if the auth token is passed in the /v1/esignet/client-mgmt/oidc-client request header? The client management endpoint requires Bearer Token authorization.

As per the default configuration, “add_oidc_client” scope is expected to be allowed scope in the auth token.

regards,
MOSIP team

Yes I am sending the access token and the token has add_oidc_client scope.

"scope": "profile email get_certificate add_oidc_client update_oidc_client upload_certificate",

Dear @Vijay_S ,

Thank you for the update, Anusha will be able to respond to you tomorrow as she is travelling, this while let us also check if we can align another colleagure/expert to respond to your query.

Best Regards
Team MOSIP

@Vijay_S

Is it possible to share the complete client-mgmt request with headers (CURL) along with eSignet service logs to check further? if you are using postman you can copy it from postman console.

I was able to fix this one, this is due to trailing / in keycloak external url. I was able to create the client after adding clientNameLangMap to the request. Which is missing in the documentation.