Close/cleanup Okta session

Hi,

Is there a way of closing an Okta connection or doing some cleanup after creating an user?

I’m authenticating a user successfully in my WCF service using Okta.Auth.Sdk, but sometimes I also need to create the user before authentication. If I create the user using Okta.Sdk in a console application and then authenticate in the same process - it works. But if I move that code in WCF, the authentication fails.

The authentication in WCF doesn’t work anymore even if I create the user in the external app using Okta.Sdk or with Postman. I need to restart the WCF service to be able to authenticate the new user.

The exception that I get is “An existing connection was forcibly closed by the remote host”.

Thank you!
Paul