- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2020 01:06 PM
I am attempting to set up my Ansible Spoke (Connected to AWX Ansible Tower) in ServiceNow using the instructions found at: https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/integrationhub-store-...
The error comes when I try to get the OAuth Token where the window will first ask for my login info into the tower and then once I am logged in and I authorize the ServiceNow Application, it displays this:
I am following the token URL template found in the instructions, https://<Ansible-Tower-Instance>.com/api/o/token/ with my tower instance replace what is found within the <>. Is there any insight why this is not working or where I could find the correct Token URL?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2021 12:27 PM
After working with this a few times, the issue will arise with OAuth when your endpoints cannot communicate due to security/network issues. ServiceNow is public facing while your ansible tower is most likely not. Mid-servers cannot be used to authenticate OAuth 2.0, as stated here: https://docs.servicenow.com/bundle/paris-application-development/page/integrate/outbound-rest/concept/c_OutboundRESTAuth.html
If you cannot loosen security between the two, then I would suggest using basic authentication, which you can find instructions for here: https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/administer/integrationhub-store-spokes/task/setup-ansible.html#setup-ansible
This will allow you to use a mid-server and the credentials for a tower service account to connect tower to your instance. Hope that helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2020 01:10 PM
Hi,
When you configure the oAuth profile in there the token url is mentioned. Check that once.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2020 01:16 PM
In ServiceNow or AWX?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2020 02:27 PM
Hello
I am having the same issue with ANsible spoke and it shows Incorrect Token Url. Did you resolve the issue? Please help me to fix the issue if you have any ideas or solutions.
Thanks,
Achu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2020 02:34 PM
Make sure that your tower has the ServiceNow instance IP addresses whitelisted and maybe even whitelist the machine you are using, this is what worked for us. You may also need to loosen your security restrictions in your instance by using the instructions found here
Hope that helps, know how frustrating it is