<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
0D5KZ00001POuaa0ADOkta Classic EngineDirectoriesAnswered2025-10-31T14:51:00.000Z2025-10-03T13:37:12.000Z2025-10-31T14:51:00.000Z

EddieE.39693 (Customer) asked a question.

Agent error during installation (JWT token)

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!


  • EddieE.39693 (Customer)

    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! 😊

    Expand Post
    Selected as Best
  • Paul S. (Okta, Inc.)

    Hello @EddieE.39693 (Customer)​ Thank you for posting on our Community page!

     

    The new AD agent version 3.18.0 has a few changes, mainly what I think is causing your issue is the new OAuth 2.0 registration flow.

    You need to make sure to leverage a SuperAdmin account or an admin account that has the new role that manages Agents and Agent registration. 

    Please view the following articles for details: 

     

    AD Agent Changes Using OAuth 2.0

     

    Okta AD Agent Registration Using OAuth 2.0

     

    "Okta Agent Registration" Application is Assigned to Admins

     

    Thank you for reaching out to our Community and have a great day!

    --

    Help others in the community by liking or hitting Select as Best if this response helped you.

    Expand Post
  • EddieE.39693 (Customer)

    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! 😊

    Expand Post
    Selected as Best
This question is closed.
Loading
Agent error during installation (JWT token)