- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 10:21 AM
I have an app that allows an OAuth token to be generated from my company's api, this app works perfectly fine on 3 existing instances, 1 on Kingston and 2 on London.
I've just created a new instance London imported the app from source control - nothing has changed since the app was last verified - however on this new instance I cannot get an OAuth token saved (nothing appears in OAuth Credentials)
The app connects and allows me to authenticate using our api, then when I authorize the Service Now app - I'm successfully returned to the oauth_redirect.do page - however the token is never saved.
Is there a permission that needs to be set to the user or app in order for tokens to be saved? It's clear something is missing in this new instance (also London) as the app works fine on 3 others (existing) - just can't think of anything.
The error I'm presented with from service now UI page is
HTTP Error 401 - Unauthorized
And in the application logs our app presents this
OAuth Access token is not available.
So to summarize on this new instance the app isn't storing the token generated from the API in OAuth Credentials
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2019 07:56 AM
I've since fixed this issue, in the System Log I could see the following...
Property 'glide.oauth.state.parameter.required' is set to true, however state parameter is missing in the request: no thrown error
This property does not exist in my other instances, rather than deleting it I've set it to false and now my token is saved and I no longer get the 401.
I will revert this setting back to true and amend our api to include the state parameter in the request returned.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 06:55 PM
Hey,
On your new instance did you check that there are existing tokens present on System OAuth --> Manage Tokens ?
Maybe that is the issue.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 07:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2019 07:56 AM
I've since fixed this issue, in the System Log I could see the following...
Property 'glide.oauth.state.parameter.required' is set to true, however state parameter is missing in the request: no thrown error
This property does not exist in my other instances, rather than deleting it I've set it to false and now my token is saved and I no longer get the 401.
I will revert this setting back to true and amend our api to include the state parameter in the request returned.