<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
0D51Y000081mI4oSAEOkta Classic EngineIntegrationsAnswered2024-04-15T11:18:24.000Z2020-03-10T10:01:14.000Z2020-04-02T02:16:12.000Z

jaszf (jaszf) asked a question.

Verify account and password with .net sdk error

The system I developed for customers needs to verify whether the ad account password is correct.

I just know that their AD account authentication is integrated with OKTA.

I find some documents and try to use okta.auth.sdk for .net

 

        var client = new AuthenticationClient(new OktaClientConfiguration

        {

          OktaDomain = "https://aaaaaaa.okta.com/",

          Token = "00EzHsUCWkG4tvjMYXl1pUS1i0XIIUbfm65jpPHgST",

          DisableHttpsCheck = true

        });

        AuthenticateOptions option = new AuthenticateOptions();

        option.Username = "zhenglong.liu";

        option.Password = "P@ssw0rd";

 

        Task<IAuthenticationResponse> res = client.AuthenticateAsync(option);

        if (res.Result.AuthenticationStatus == AuthenticationStatus.Success)

        {

          Console.WriteLine("S");

        }

 

 

but it always throw an exception: An existing connection was forcibly closed by the remote host

 

help..

 

 

 

 


  • Hey there! Sorry for the lack of response here on the Discussions forum. If you’re still looking for an answer, I would recommend checking out our Developer resources, including the Developer Forum (https://devforum.okta.com/) and documentation. If you are unable to find the solutions you're looking for there, we would encourage you to contact our dedicated Developer Support team at developers@okta.com, and they will be able to help you out.

    Expand Post
This question is closed.
Loading
Verify account and password with .net sdk error