- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2025 09:55 AM - edited 05-29-2025 08:03 AM
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.
@Ankur Bawiskar please help. stuck in this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 09:11 AM - edited 05-29-2025 09:11 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2025 09:11 AM - edited 05-29-2025 09:11 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 07:24 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 10:18 AM
Hi @Ankur Bawiskar I am stuck at step 1 where we get access token and refresh token for the first time using 'Get OAuth Token' related link from credentials assocaited with application registry i created.
when i click on get OAuth token then it doesnt take me to 3rd party app for authentication and after that it redirect back to ServiceNow as redirect url is set up as ServiceNow isntance URL. but the problem is during this process it doesn't store any token in manage tokens table. i checked all OOTB Oauth and for them it does refresh token in manage token table when i can click on get OAuth token.
I never got a message 'OAuth token flow completed'. Please advise.
below are URLs that gets formed after i click on get oAuth token.
2. accounts.zoho.com/oauth/v2/auth?scope=SDPOnDemand.requests.ALL+SDPOnDemand.changes.ALL&response_type=code&state=-744184725&redirect_uri=https%3A%2F%2F********.service-now.com&client_id=********
3. login to zoho
4 redirect back to SN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 01:37 AM
then it means it's grant type etc is not configured properly.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader