<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z0000A9m6dOCQQOkta Classic EngineAuthenticationAnswered2024-06-20T15:54:38.000Z2024-06-19T21:21:01.000Z2024-06-20T15:54:38.000Z
Extending Microsoft Identity Server to integrate with Okta

I am trying to use Microsoft Identity Server to integrate with Okta in dotnet core 6.0 project. I followed a sample code to add Okta as external identity provider.

 

builder.Services.AddAuthentication()

  .AddOpenIdConnect("okta", "Okta", options =>

  {

    options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;

    options.SignOutScheme = IdentityServerConstants.SignoutScheme;

    options.Authority = $"https://{OktaDomain}/oauth2/default";

    options.ClientId = ClientId;

    options.ClientSecret = ClientSecret;

    options.ResponseType = "code";

    options.Scope.Add("openid");

    options.Scope.Add("profile");

    options.Scope.Add("email");

    options.SaveTokens = true;

    options.TokenValidationParameters = new TokenValidationParameters

    {

      NameClaimType = "name",

      RoleClaimType = "role"

    };

  });

 

However, on code execution I received the following error.

 

2024-06-19 16:54:54.139 -04:00 [ERR] ErrorException "IDX20803: Unable to obtain configuration from: 'https://https://dev-945062.okta.com/oauth2/default/.well-known/openid-configuration'. Will retry at '6/19/2024 8:55:04 PM +00:00'. Exception: 'System.IO.IOException: IDX20804: Unable to retrieve document from: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.

 ---> System.Net.Http.HttpRequestException: No such host is known. (https:443)

 

 

I am looking for guidance to help me troubleshoot this error.

 

Best regards,

Muhammad Piracha.

 


  • User17157611498146715886 (Customer Support Online Community and Social Care)

    Hi @00urncm0fGsdNobYk356m1.56139295220643E12 (Customer)​ , thank you for contacting Okta Community!

     

    I've reviewed our documentation for something relevant. It looks like your question is more appropriate for our dedicated Okta Developer Forum.

    I advise reaching out via https://devforum.okta.com as they will have more insight into this topic. 

    In the meantime, you can reference this similar post from Okta Developer: 

    InvalidOperationException: IDX20803

     

    While we'll do our best to answer your questions here, this medium is more inclined towards Okta's core products and features (non-developer work).

     

    Regards. 

    --

    Help others in the community by liking or hitting Select as Best if this response helped you.

    Expand Post
This question is closed.
Loading
Extending Microsoft Identity Server to integrate with Okta