Need help with the OpenID Connect application

Dear people,
I have started to use Okta and I have couple of newbie questions.
I have tried to create the OpenID Connect application without a success.
According to the article I should select what type of application SWA or SAML 2.0, or OpenID Connect.

But when I press on “Add application” I can see the following options:
Single-Page App
What option should I select to create the OpenID Connect application?

Can you provide me the updated link?

Thanks in advance,

Hey @michael!

Head on over to our quick start guide, pick your language (and how you want your users to log in) and the guide should walk you through everything else.

To answer your question though, pick Web

Keep us posted!

In addition to what @bdemers said, you can read through the following link to understand which flow/app you will need to create based on your requirements -

@bdemers what kind of application you are going to integrate the OKTA api that one you have to choose. After you will get option further next step to choose the Openid option.

I will happy for couple of additional clarifications:

I have created the application testopenid.
What is the URL to get the openid-configuration?
According to the spec it should be something .well-known/openid-configuration
I have tried the URL below but get 404:

Please help.

can you share more info, what kind of application you are going to use and what kind of method you have choosen

I have selected the Web application and leave defaults according to the suggested article :

Please let me know if you need any additional clarifications

I have tried the URL below but get 404:

It should look like this:


In fact I was able to use the following URL:

issuer “https://{{YOUR_ORG}}”
authorization_endpoint “https://{{YOUR_ORG}}”
token_endpoint “https://{{YOUR_ORG}}”
userinfo_endpoint “https://{{YOUR_ORG}}”
registration_endpoint “https://{{YOUR_ORG}}”
jwks_uri “https://{{YOUR_ORG}}”

Is the .well-known configuration related to a client?

When I have tried to access to

I got the following error:

errorCode “E0000007”
errorSummary “Not found: Resource not found: testopenid (PublicClientApp)”
errorLink “E0000007”
errorId “oaeAS0AZWMFQz-QLJ2dclPt4w”
errorCauses []

Grab the client_id from the application screen and you should be set:

1 Like

Most endpoints (except registration_endpoint and jwks_uri) the same:

issuer “https://{{YOUR_ORG}}”
authorization_endpoint “https://{{YOUR_ORG}}”
token_endpoint “https://{{YOUR_ORG}}”
userinfo_endpoint “https://{{YOUR_ORG}}”
registration_endpoint “https://{{YOUR_ORG}}”
jwks_uri “https://{{YOUR_ORG}}”

Yep! That is correct. Okta has a data model that allows Authorization Servers and Clients to support each other in an M:M relationship.


Thank you very much for your help!
I will happy for the additional clarification.

I need to map the login Okta user attribute to the preferred_username claim.

My application is waiting for the user name at the preferred_username claim.

What is the best way to it?
Thanks in advance,

It should be mapped to that by default:

Are you seeing something different?

Unfortunately in my case the token is without the preferred_username claim.
This is the authorization token:

“sub”: “00uejawry54O5kDRU0h7”,
“ver”: 1,
“iss”: “https://{{MY_ORG}}”,
“aud”: “0oaek2aj5jC6gCY3A0h7”,
“iat”: 1523033174,
“exp”: 1523036774,
“jti”: “ID.LRYa1aY7KeeLRZCzHzLOHRjkS9aZhZoFr-iF5KHCqwk”,
“amr”: [
“idp”: “00oej9an16nig7brj0h7”,
“auth_time”: 1523033173,
“at_hash”: “VOaT-w2csfAd2Rd5M1wdsw”

This is the userinfo token:


What is wrong?

Please note that I am using the free trial.

Should I use the custom user attributes?
(It is supported in the free trial)
I will appreciate any insights,

I believe you are looking at the access_token, the preferred_username claim will be in the id_token.

Also, make sure you ask for the openid scope during the authorization request.

Thanks Tom,

Unfortunately the id_token token is empty:


The authorization request include all required parameters include scope=openid


Still no guess what is wrong …

I will appreciate any help,

Hi Tom,
I will happy for your help,
I have debugged the issue and now I understand the root cause.
The userinfo endpoint returns the empty results.
I have configured the endpoint according to .well-known/openid-configuration.
Its URL is https://{{MY_ORG}}
But it returns the empty results.

I have tried to call it manually, but it still returns the empty results {}

curl -s --tlsv1 -L -k
-H “Authorization: bearer e…A”

Is the userinfo endpoint configured correctly?
Why it returns empty results?

I will appreciate any help,

Hi Michael,

In addition to openid, you should also add profile & email to the scope.
If you need the groups, add groups to the scope as well.

The id_token will return the user’s profile information only if profile scope is included in the /authorize request.
Refer this link to the set of scopes you can pass -

Let us know if this resolves your issue.

1 Like

Hi vijet,
Thank you for your help!
It works!