Tobe
Tobe

Reputation: 93

Cloud Foundry: Credentials were rejected

I'm having trouble with cf login. Whenever I try to login i get the following error:

Credentials were rejected, please try again.

Now I'm Aware that this is a known issue. But even with alternatives, I always get the same message.

What I've tried so far:

Git CMD; cmd.exe; Powershell;
cf login -u [email protected]; (and different variations)
cf auth "[email protected]" "MyPassword";

What else is there I can try or what am I missing?

Upvotes: 1

Views: 1984

Answers (1)

Daniel Mikusa
Daniel Mikusa

Reputation: 15006

When you run cf login or cf auth and specify a username/password, you are attempting to authenticate with UAA using a standard password based authentication. If your company uses single sign-on (i.e. SSO), this will not work.

When your company uses SSO, you need to run cf login -sso (that's it, no other flags). In this case, the cf cli will give you a link to click. You'll go to this link in your browser and it will display a one-time password. The cf cli will then prompt you for the one-time password, type it in and the cli will use that to log you in with your company's SSO system.

Again, if your company has set up SSO you must use the cf login -sso option to login. As far as I know, there's no way to tell from the cf cli if your company requires SSO, but you can tell if you go to login.system_domain in your browser (where system_domain the the DNS entry set up for CF). When you go to that page, you'll see the login form and when SSO is set up the bottom of the form will have a link that says "click here to login with SSO" or something like that. That link only shows up when SSO is enabled.

Upvotes: 3

Related Questions