Why I can't use API for common user integrated with OIDC in ICP(IBM cloud private)

159 Views Asked by At

https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0/apis/auth_manage_api.html

I try to use the API for common user integrated with OIDC, but the error msg shows:

{"error_description":"invalid_resource_owner_credential","error":"server_error"}

command as the following

curl -k -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -d "grant_type=password&username=abc\@test\.com&password=ChangeMe\!\@\#&scope=openid" https://<cluster_access_ip>:8443/idprovider/v1/auth/identitytoken --insecure

But it is working fine for the administrator: admin/admin, so strange.

2

There are 2 best solutions below

0
On

Have you configured the LDAP, created Teams and added users to the team? Did you check the logs on Master node /var/log/containers for platform-identity-manager, _platform-auth-service, *platform-identity-provider?

0
On

Issue is with the special character "!" which is used for history expansions in command line prompt. You can use below command which works...

curl -k -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -d "grant_type=password&[email protected]&password=ChangeMe"'!'"@#&scope=openid" https://<cluster_access_ip>:8443/idprovider/v1/auth/identitytoken --insecure