0

I am trying to retrieve an OAuth2 token from our Azure cloud via the DS hierarchical data object. I am trying to do this without variables and just plugging in the actual URL which would include the tenant_id (as part of the URL). For the rest of the fields which should be reflected within the body: grant_type, client_id, client_secret and scope, I am not sure how to associate them into the DS object as part of the body. The DS object only allows for the designation of "custom headers" as part of the "Request" tab of the Rest Step. Is this even feasible or am I missing a piece? Should I be pushing a JSON file into that hierarchical object via an input link? If so - how would we ensure the id and secret are not easily visible by leaving a static file somewhere?

TIA Steve

I have tried to assign the expected body types as headers - this will not apparently work at all. The request component for the Rest Step implies that perhaps I should be pushing something into the object but there are no good examples on this aspect.

I have looked at the response to a similar question but there is not a reference to the HOW, just a re-point to the OAuth2 reference.

Steps to generate OAuth2 token in hierarchical stage in Datastage

  • It's been a while since I worked with OAuth in the HD Stage. Today I have no access to look at it anymore, but I remember that I had to connect twice, one to gain access an one to actually use the connection. And there was something about the timeout values. Sorry I cannot remember more detailed. – Justus Kenklies Mar 06 '23 at 15:48
  • Are you able to recall if you were successful with the process? – SGWtheNext Mar 06 '23 at 19:29

1 Answers1

0

At HD request tab have "custom header", then you'll need add all them: grant_type, client_id, client_secret and scope

When you add, you need check option "mapping" and the mapping tab show the all headers to mapping values.

Hope some images helps you.

Put your url and enable ssl

Create all custom headers

Mapping input values to custom headers

And after that, you need other HD to consume others RESTApis.

Ygor Reis
  • 1
  • 1