
EddieE.39693 (Customer) asked a question.
Hi all,
I am testing to integrate Okta services with my primary Domain.
I have followed pre-requisites as per documentation and followed through the steps.
Created the Okta Service user and assigned required permission.
From what I understand from logs is a bad request toward my org link and jwt token response.
I searched the support if someone dealt with the same issue but I was not able to find something similar judging by title.
Here are some logs:
"Caused by Okta.Api.OAuthException: Could not fetch a new access token ---> Okta.Api.OktaApiException: Unexpected status code 400 BadRequest for URL https://trial-account.okta.com/oauth2/v1/token
at Okta.Api.RestClient.OnResponseError(String url, HttpWebRequest request, HttpWebResponse response)
at Okta.Api.RestClient.OnResponseError(HttpWebRequest request, HttpWebResponse resp)
at Okta.Api.RestClient.DoRequest(String method, Uri uri, String requestBody, String contentType, String accept, Encoding encoding)
at Okta.Api.RestClient.FormPost(String accept, Dictionary`2 formParams, UriTemplate template, String[] args)
at Okta.Api.Authentication.JwtAuthenticationProvider.GetAccessToken()
at Okta.Api.Authentication.JwtAuthenticationProvider.<GetAccessTokenAsync>b__25_0()
--- End of inner exception stack trace ---
at Okta.Api.Authentication.JwtAuthenticationProvider.<GetAccessTokenAsync>b__25_0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()"
Any help is much appreciated.
Thanks in advance!

Hi @Paul S. (Okta, Inc.) , thanks for the reply but the issue seemed to be related with the server time and time zone. I did try to sync manually with different NTPs but it just would not sync for some reason. I previously changed the time zone manually but maybe I forgot to change the time as well, not sure if I tried both before posting this thread tbh.
What I did in the end is just adjust the time and the time zone manually and after that everything was as smooth as it gets! 😊