
User17066229343896373428 (Customer) asked a question.
I have a legacy application .NET 4.5 web app with a StartUp.cs class file that I've had to add config for OKTA. However the tokenRequest looks fine...
tokenRequest => {Method: POST, RequestUri: 'https://trial-1234567.okta.com/oauth2/default', Version: 1.1, Content: System.Net.Http.FormUrlEncodedContent, Headers:
{
Content-Type: application/x-www-form-urlencoded
Content-Length: 328
}}
but the token response does not...
tokenResponse => {StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:{ Connection: keep-alive Vary: Accept-Encoding x-okta-request-id: 6ddc69cb099c04e56fa7d14ee0ec8964 referrer-policy: strict-origin-when-cross-origin accept-ch: Sec-CH-UA-Platform-Version pragma: no-cache Cache-Control: no-store, no-cache Date: Wed, 24 Jul 2024 15:58:09 GMT Set-Cookie: JSESSIONID=293D55CF169273D501669D45B7B0A333; Path=/; Secure; HttpOnly Set-Cookie: t=default; Path=/ Set-Cookie: DT=DI1mKJyN1WVQ4uIt67g5q7gvg;Version=1;Path=/;Max-Age=63072000;Secure;Expires=Fri, 24 Jul 2026 15:58:09 GMT;HttpOnly Server: nginx x-content-type-options: nosniff Strict-Transport-Security: max-age=315360000; includeSubDomains Content-Length: 2328 Content-Type: text/html; charset=utf-8 Expires: 0 content-language: en}}

Hi @User17066229343896373428 (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 devforum.okta.com as they will have more insight into this topic.
In the meantime, you can reference this similar post from Okta Developer: https://devforum.okta.com/t/authorize-end-point-throws-error-404-as-far-as-i-understand-inorder-to-generate-the-sso-token-for-a-user-the-first-step-is-to-authenticate-using-username-and-passowrd-get-an-authorization-code-and-using-that-i-should-generate-an-sso-token/20922
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.