# Okta OIDC Metadata URL

**URL:** <https://devforum.okta.com/t/okta-oidc-metadata-url/11502>\
**Category:** Questions\
**Created:** [October 27, 2020, 3:23am UTC](https://devforum.okta.com/t/okta-oidc-metadata-url/11502 "2020-10-27T03:23:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nngochue](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@nngochue](https://devforum.okta.com/u/nngochue)\
**Post date:** [October 27, 2020, 3:23am UTC](https://devforum.okta.com/t/okta-oidc-metadata-url/11502/1 "2020-10-27T03:23:40Z")

</div>

I develop **Open ID Connect [Asp.Net](http://Asp.Net) Web Application** with **Okta.AspNet** NuGet package. I created a developer account at **[https://developer.okta.com/signup/](https://developer.okta.com/signup/)** and got the metadata URL as **https://{my-sub-domain}.okta.com/oauth2/default/.well-known/openid-configuration**. I setup the required fields for the application ( _ClientId, ClientSecret, OktaDomain, RedirectUri, PostLogoutRedirectUri,Scope_). Everything works fine in my developer environment.

When deployed on production, my customer sent me the required fields ( _ClientId, ClientSecret, OktaDomain, RedirectUri, PostLogoutRedirectUri,Scope_). The difference is the metadata URL in format **https://{client-domain}.oktapreview.com/.well-known/openid-configuration**. The application failed with the error " _Unable to retrieve document from: ‘https://{client-domain}.oktapreview.com/oauth2/default/.well-known/openid-configuration’._"

So I have these questions:

- How do I create an account with \*.oktapreview.com?
- Why my customer metadata URL differs from my metadata URL. (does not contain **/oauth2/default** ) ?

---

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://devforum.okta.com/u/warren)\
**Post date:** [October 27, 2020, 4:41pm UTC](https://devforum.okta.com/t/okta-oidc-metadata-url/11502/2 "2020-10-27T16:41:38Z")

</div>

@nngochue I don’t think it’s possible to guarantee an account with the \*.oktapreview.com url. However, you should be able to modify the OktaDomain property according to the doc [https://github.com/okta/okta-aspnet/blob/master/docs/aspnet4x-mvc.md#configuration-reference](https://github.com/okta/okta-aspnet/blob/master/docs/aspnet4x-mvc.md#configuration-reference)

Both metadata URLs are valid, the one without the /oauth2/default refers to the Okta org as the authorization server which is further explained in this article: [https://support.okta.com/help/s/article/Difference-Between-Okta-as-An-Authorization-Server-vs-Custom-Authorization-Server?language=en\_US](https://support.okta.com/help/s/article/Difference-Between-Okta-as-An-Authorization-Server-vs-Custom-Authorization-Server?language=en_US) You will need to modify the AuthorizationServerId property to be an empty string or null to support this.

---

<div class="post-metadata">

**Author:** ![nngochue](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@nngochue](https://devforum.okta.com/u/nngochue)\
**Post date:** [October 28, 2020, 2:13am UTC](https://devforum.okta.com/t/okta-oidc-metadata-url/11502/3 "2020-10-28T02:13:24Z")

</div>

@warren Thank you. It works perfectly.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [October 29, 2020, 2:13am UTC](https://devforum.okta.com/t/okta-oidc-metadata-url/11502/4 "2020-10-29T02:13:25Z")

</div>

Closed on October 29, 2020, 2:13am UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
