cancel
Showing results for 
Search instead for 
Did you mean: 

cf login auth failure

thomasrobertz
Discoverer
3,352

Hello,

I get an authentication failure when trying to login with cf:

{"error":"invalid_grant","error_description":"User authentication failed: PASSWORD_LOCKED"}

(To me the mention of a grant and a locked password seems to indicate an administrative issue)

With credentials: I get the above error.

With SSO: I get the error "Sorry, we could not authenticate you. Try again." on the identity provider login page (https://accounts.sap.com/saml2/idp/sso...).

I also get the error "Authentication failed. " when trying to login to Cloud Foundry from BAS.

I am able to obtain a working SSO token from to the general domain (https://api.cf.us10.hana.ondemand.com)

but not from my endpoint (https://api.cf.us10-001.hana.ondemand.com)

cf version 6.53.0+8e2b70a4a.2020-10-01 on Ubuntu

Do I have to configure something? Can anybody help or do you need further info?

Accepted Solutions (0)

Answers (4)

Answers (4)

thomasrobertz
Discoverer

Update:

I still couldn't get it to work.

Also I tried changing my password.

That didn't work either, I get a similar message to above.

To make sure that I didn't enter a wrong password I tried it 3 times now my password seems to be locked for good.

Is there any support besides this forum where I can get my password reset/unlocked and also get the above issur resolved?

Thanks

yogananda
Product and Topic Expert
Product and Topic Expert

thomasrobertz

can you try this way

cf login --sso
thomasrobertz
Discoverer
0 Kudos

Hello Yogananda, thanks for your answer.

cf login --sso prints a link to the identity provider page to the console. For instance:

cf login --sso
API endpoint: https://api.cf.us10-001.hana.ondemand.com

Temporary Authentication Code ( Get one at https://login.cf.us10-001.hana.ondemand.com/passcode 😞 

When I follow the link, I am asked to choose the default or a custom sign in provider. I choose the default provider.

Next I get to a page where I am asked to provide login credentials, which I do.

But then I get an error message described above ("Sorry, we could not authenticate you. Try again.")

BTW When I use another endpoint I get a valid token.

BharadwajKura
Newcomer
0 Kudos
This worked for me.
Sibai
Discoverer
0 Kudos

I had the same problem. The issue was that the password contained special characters. Simply change the password to one that includes only uppercase letters, lowercase letters, and digits.

oliver_kalkofen3
Newcomer
0 Kudos

I found a solution for me. I was also not able to log in with "cf login". Then I tried resetting my password(s), which did not help. Then I tried "cf login --sso", and that did not work out in Internet Explorer and Chrome (login fails). Then, I tried with Firefox and it worked!

oksel
Explorer
0 Kudos

look below

oksel
Explorer

I am experiencing this issue in CI/CD. Im logged onto cf in SAP Business application studio using sso, but once i push my changes, the changes goes to github, but the CI/CD build fails during stage release. Raw Response: {"error":"invalid_client","error_description":"{\"error\":\"invalid_grant\",\"error_description\":\"User authentication failed: Unauthorized\"}"}

Im not sure how to provide credentials for cf in CI/CD when the only way i know which works is using SSO passcode... Do you know what to do?

RK0008
Explorer
0 Kudos

I also have similar issue where i am trying to deploy application from github through CI/CD pipeline

error is failing acceptance test when the job run for CI/CD  service.

Error Code: 401
Raw Response: {"error":"invalid_client","error_description":"{\"error\":\"invalid_grant\",\"error_description\":\"User authentication failed.\"}"}

although i repeatedly changed CLI password and used same command to login manually to CLI ,its working fine but when its  running from job its repeatedly failing at acceptance test.

Not sure how to solve this ( since i am using BTP trail account ) can anyone help here any BTP admin experts please
acceptance test failining.png