title: Setting Up OAuth Authentication in SAP SuccessFactors
body: <p>In order to get oData from success factors odata service, I'm trying to setting up a connection between SuccessFactors and SAP BTP by creating a destination as reported in this <a href="https://help.sap.com/docs/SMI_LINE/f0a201cdb56d44e9823a3db3539a5d4f/c6174a84455243df86edff3f3f99aad5.html#loiob5969a28ee5140639c1c1ff5ef1def72" rel="nofollow noreferrer">official guide</a>.</p>
  <p>Using postman everything works fine but, once I check the connection of destination previously created, the response received is <em>401: Unauthorized</em>.</p>
  <p>Below the configuration of destination:
  <a href="https://i.stack.imgur.com/WGeNS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WGeNS.png" alt="enter image description here" /></a></p>
  <p>Here you can see the properties:
  <a href="https://i.stack.imgur.com/x0YAP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x0YAP.png" alt="enter image description here" /></a></p>
  <p>And here the response:
  <a href="https://i.stack.imgur.com/6y1mo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6y1mo.png" alt="enter image description here" /></a></p>
  <p>I know that is wrong but, for the sake of curiosity, I've also created a different destination with no authentication. Then directly from code I've developed three nested ajax requests. First provides the assertion, second the user token, third is the one which, leveraging the token, get the odata. Sadly response is always <em>401: Unauthorized</em>.</p>
  <p>Below the code of last ajax request, the other two are good:</p>
  <pre><code> // Validate access token
  $.ajax({
      type: 'GET',
      headers: {
          &quot;Authorization&quot;: &quot;Bearer &quot; + sAccessToken
      },
      url: '/oauth/validate',
      success: function(data){
          console.log(&quot;Success: &quot;, data);
      },
      error: function(e){
          console.log(e);
      }
  });
  </code></pre>
  <p>Here the request header:</p>
  <p><a href="https://i.stack.imgur.com/8Snf2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Snf2.png" alt="enter image description here" /></a></p>