Getting Oauth Token in Scope vs Global
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 06:38 AM - edited 07-26-2024 06:38 AM
I needed to create an Application Registry to get an Oauth Token from a third-party provider.
I defined the application registry and related the Oauth entity profile to a Oauth 2.0 credential.
I had all of this defined in a custom spoke - had issues getting a token.
I defined everything the same in Global, and had no had no issues getting a token.
Is there something missing? Why would setting up Oauth in a custom spoke have issues getting the token?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I'm experiencing the same behavior.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello, @ttakahashi .
To retrieve the token, you may need to create a custom “OAuth API Script” as needed.
How you should customize it from the OTB version depends on the API specification of the system from which the token is being obtained
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Scope should not cause an issue with receiving a token.
I just created an application registry within a scoped application and created a user with role "snc_platform_rest_api_access".
I made a POST call from postman and successfully received a token. Attached are screenshots for your reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I read the rest of the replies and can't help feeling I missed something.
Did you setup OAuth in one ServiceNow instance and trying to request a token from another?
In that case, you must make a few adjustments. Do let me know if you need that information. Basically, you have to designate the user you have the role to in "OAuth Application User"
If you need this information as well, I will give screenshots.