generateAuth of SN_AUTH API throws exception for users other than System Admin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2023 11:32 AM
We have built one custom scoped application in which we are fetching the data from the AWS SQS Queue using the REST MessageV2 API and SN_AUTH API
In order to fetch the data from the AWS SQS Queue, we will have to sign our request using the generateAuth() method of the sn_auth.RequestAuthAPI() API and make the REST call using the RESTMessageV2 API.
Now this works fine if the code is run by the ServiceNow System Admin, but when we try to run the code from our App admin, it's throwing the error "java.lang.NullPointerException".
Our App Admin has the following roles:
itil
itil_admin
sn_si.admin
flow_operator
workflow_admin
mid_server
sn_ti.malicious_attachment_access
sn_ti.observable.write
We also tried adding all the roles mentioned in the System Admin except for the "admin" role to our App admin role, but it still did not work.
Can someone help us determine what could be the reason for this exception and how to resolve it?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2023 06:06 AM
Hi,
I am working on this generateAuth method. I am still confused on how to use or to work using the generateAuth() method of the sn_auth.RequestAuthAPI() API and make the REST call using the RESTMessageV2 API. Could you please help me to provide the step by step screenshot on how your using it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 05:45 AM
Any luck here? I am trying the same. It runs well in background script but doesnt work in scripted rest API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2023 06:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2023 07:17 AM
Hi,
I want to generate a AWS signature dynamically. So I can across about generateAuth(). so I have created the authentication algorithm and so on . But I am not sure on how to use/where to use/how to call it from background script using generateAuth() method of the sn_auth.RequestAuthAPI() API and make the REST call using the RESTMessageV2 API. So thought of asking you about the step by step procedure with screenshot.. so that It will be helpful to generate AWS signature dynamically?