Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"error occurred while fetching openid configuration: unexpected status code" #159

Open
gadisn opened this issue Jun 20, 2022 · 2 comments
Open

Comments

@gadisn
Copy link

gadisn commented Jun 20, 2022

Issue Template

Step 1: Is this issue for here?

Yes

Step 2: Describe the problem (very short text description):

Running smctl login fails saying
Error: Could not build authenticator Reason: error occurred while fetching openid configuration: unexpected status code

Step 3: Describe the problem (steps):

  1. Run smctl login -a https://service-manager.cfapps.sap.hana.ondemand.com --auth-flow=client-credentials --client-id='...' --client-secret='...' --param subdomain=...

Observed Results:

The error listed above

Expected Results:

Success in login

Note:
Running the same on one sub account works while it fails on a second sub account (I've double check that the client id, client secret and sub domain are correct)

@gadisn
Copy link
Author

gadisn commented Jun 21, 2022

An update:
It turned out that when the login works OK it is in a sub account in the 'Europe (Frankfurt) - Canary' region', while when it fails it is in a sub account in the 'Europe (Frankfurt) AWS 2' region - so a different login url is required (https://service-manager.cfapps.sap.hana.ondemand.com Vs https://service-manager.cfapps.eu12.hana.ondemand.com).

With the correct url the login is OK.

Would it be possible to improve the error indication?
Thanks

@zfrk
Copy link

zfrk commented Jun 7, 2023

Hello @gadisn,

I am getting the same error, I found the solution, but the error is the same.

I totally agree with you about error message improvement or any debug log mechanism that could be added.

My problem totally related wrong subdomain, user should get the subdomain from BTP subaccount details page, not from URL.

image

Regards,

Zafer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants