Skip to Content
0
Sep 27 at 11:38 PM

Job calling XSJS with XSUAA - 401 not authorized

67 Views

Hi guys, I need little help here.

I have a project in HANA 2.0 SPS05 with a node module enabled for XSJS acessing a HDI DB module. This module have an XSJS (process.xsjs) and is binded with XSUAA.

I'm scheduling a Job in XS Advance jobScheduler to execute this XSJS as follows:
{
"description": "Job1",
"action": "app.xs:process.xsjs::execute_proc",
"schedules": [ { "description": "Job process",
"xscron": "2021 1 1 sun 12 0 0" } ]
}

My problem is when job is triggered I'm getting a 401 error, not authorized.

I tried somethings without sucess like set enviroment variable SAP_JWT_TRUST_ACL to node/XSJS module and scopes of XSUAA service like this video from SAP Hana Academy: https://www.youtube.com/watch?v=JrCm0az_6uo

Thanks for any help!