Access application url

i am trying to access another application which dependent on OKTA login.
i am writing C# console application (eventually it will converted to a winform application ) to consume OKTA authentication. i am successfully able to authenticate and get the session id by using C# OKTA SDK.
After getting session id , passing this as a parameter “?sessionToken=” in the url and calling this uri by HttpClient. the response content shows me the login screen.
. another team had written a python script and it is able to get the correct page. in python it is using sessions and cookies.

Am i missing something


What urls are you using to do this? Is this an OIDC app where you are passing the sessionToken along in the authorize url?

If so, are you not seeing the user redirected to the redirect_uri configured for your application?

Hi Andrea,

thanks for your reply. i am trying to execute a get request for my step-up url.

https:///login/step-up/redirect?stateToken= when i do a get request through c# HttpClient it takes me back to sign-in page asking for login.

I’m not sure if this could be the cause, but do you have a custom domain configured for your Okta org?

Make sure your application/issuer is configured to use the same domain for all your requests/configurations that the user is being logged into, as the okta session will only be valid on the domain on which the authentication occurred: if the user logged in on, they will be unable to access (the custom url for the org) without completing primary authentication there as well