How to sign in into Cloud Foundry from SAP Business Application Studio with 2FA active?

You may have experienced an error like this, when you have tried to sign in via the SAP Business Application Studio via the normal cf login command:

Error Code: 401 – Raw Response: {“error”:”invalid_client”,”error_description”:”{\”error\”:\”invalid_grant\”,\”error_description\”:\”User authentication failed: INVALID_OTP_CODE\”}”}

To solve this problem, we can use another simple method which signs you in via the browser and generates a temporary authentication code.

For that, we use the command:

cf login --sso

We can then get the authentication code by following the passcode website showed in the terminal:

Passcode entry: https://login.cf.eu20-001.hana.ondemand.com/passcode

Then we enter sap.ids in the login mask to enter the default SAP Identity Provider, where we can use the BTP credentials. Or if you have SSO activated, then your own Identitiy Provider credentials of course.

After successfully sign in, you receive this temporary code, which you now enter into your BAS and sign in directly.

Temporary Authentication Code

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Ads Blocker Image Powered by Code Help Pro

Ad blocker detected

We have detected that you are using extensions to block ads. Please support us by disabling your ad blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock