Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When I log in to the Cloud foundry (Authenticating... {"error":"invalid_grant","error_description":"User authentication failed: unauthorized"})

I am inside the SAP Business Application Studio, inside the terminal, when I put the CF login command I enter my credentials and this appears

Authenticating... {"error":"invalid_grant","error_description":"User authentication failed: Unauthorized"}

Could you please help me

like image 916
Javier Hernan Huertas Medrano Avatar asked Nov 05 '25 10:11

Javier Hernan Huertas Medrano


2 Answers

The solution on my side is to use the --sso option.

cf login --sso -a https://api.cf.us10.hana.ondemand.com

Afterwards you will be prompted to get a passcode from this url: https://login.cf.us10.hana.ondemand.com/passcode

However, for me this failed several times. The key is to use alternative identity provider on the login screen and enter sap.ids as provider when you already have an SAP Universal login

enter image description here

Sadly, this does not work when using trial version in API endpoint https://api.cf.us10-001.hana.ondemand.com . I already opened a support request.

like image 104
Sven Avatar answered Nov 07 '25 01:11

Sven


I had the same problem and solved it by using P-User and password, instead of username and password.

cf login -a <cloud_foundry_api> -u <your_p_or_s_user> -p <your_password>

The same thing happens for the BTP CLI.

like image 24
Gabriel Rodrigues Avatar answered Nov 06 '25 23:11

Gabriel Rodrigues



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!