- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2021 12:25 AM
Hi All,
My requirement is to use access token to connect with other servicenow instance(third party application) and I have implemented the following.
1. Configured Auth2.0 Provider with grant type 'Resource owner password credentials'
2. Created Rest message with Authentication type : OAuth2.0 and OAuth Profile :<created in step 1>
3. Create HTTP method with Authentication type :'Inherited from parent' and POST method
4. Create Business rule on incident table with some conditions to call Rest API (created in step 2 and 3) and I'm not passing authorization details from Business rule.
This is working fine when I (I have admin role) will create an incident and the ECC payload contains Authorization value as "Bearer <Access token>"
If non-admin creates incident with triggered conditions, access token value is passing as null value. please refer ECC payload snap
Question1 : Could you someone tell me why this not working for others? when I tested this in DEV instance it it working fine for everyone and its not working in QA/test instance.
Question 2: Is it require to pass access token value from Business rule ? If Yes, could you help me with reference script if you have and would that script automatically generates the new access token after expires?
Thanks in Advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2021 12:30 AM
Hi,
Is it working fine in DEV with non-admins?
The ACL on the oauth_credential table might be causing this issue. Try adding a read ACL on the table and provide the role who needs this access to call and you should be able to test it.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2021 01:55 AM
Glad to help.
Do visit my blog for OAuth Inbound and if it helps please mark helpful and also bookmark
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2023 06:31 AM
Hi Ankur,
I am facing same issue,
When non admin make a call to API using widget, {Authorization=Bearer null, (Token is missing.
However when admin make a call to outbound API {Authorization=Bearer eyJ0eXAiOiJKV1QiLCJhbGciO
return authorization to it.
Any thoughts on this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2023 07:50 AM
Hi,
I see that the field "token_received" of the table "oauth_credential" is an "password2" type.
I need to use the "GlideEncrypter" API ?
Or there are some specific method on another API ?
NOTE:
I ask this, because I know that the "GlideEncrypter" will deprecate in a shot time.
Regads
Vincenzo