O Auth 2.0 is not retrieving token , it does from the Postman but not from ServiceNow

GD11
Tera Expert

I am doing REST Outbound integration from ServiceNow to Manage engine Service Desk for that Manage engine support Server based O Auth 2.0. I have configured it at our and wrote a scheduled job to get the token but it is not retriving any token it gives null response. if i click on the get OAuth token then it works fine but not through script or when i try to send request from REST POST. please help. sharing configuration attachments for reference. 

 

Grant type is authorization code. i have client id, secret, endpoint, scopes etc. but sitll note working.

 

GD11_0-1748018909966.png

GD11_1-1748019035403.png

GD11_2-1748019065267.png

@Ankur Bawiskar please help. stuck in this.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@GD11 

refer below links

OAuth2.0: Get new Access Token from existing Refresh Token

How to Setup OAuth2 authentication for outbound RESTMessageV2 integrations

OAuth : Script to Automate Token Request

How to generate the access token once it is expired from Business Rule?

How to get Auth Token using script when grant type is Authorization code

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

HI @Ankur Bawiskar  yes, there was issues at 3rd party end, when did the cofiguration correctly we started to get both Access and refresh tokens.