cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

JobSchedule service for multitenant applications

fshestov
Explorer
195

Hi. I have a task to use Job Schedule Service with a multitenant application to create tasks for every subscriber. I followed the blog https://community.sap.com/t5/technology-blogs-by-sap/using-job-scheduler-in-sap-cloud-platform-13-mu.... I could not obtain a new token for JobSchedule from the subscriber side. The method xssec.requests.requestUserToken does not exist in the current library version. I implemented my own version 

    const tokenResponse = await axios({
      method: 'post',
      url: `${uaa.url}/oauth/token`,
      headers: {
        Authorization: `Basic ${Buffer.from(`${uaa.clientid}:${uaa.clientsecret}`).toString('base64')}`,
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      data: `grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&response_type=token&client_id=${uaa.clientid}&assertion=${userJwt}`
    });
  

but I am getting the error "Unable to map issuer, https://xxx.authentication.us10.hana.ondemand.com/oauth/token , to a single registered provider"

repository: https://github.com/FedorSh-illumiti/JobscheduleMultiIssue.git
How can I obtain a new token? 

Accepted Solutions (0)

Answers (0)