question

RaghunandanVenkateswaran-2026 avatar image
0 Votes"
RaghunandanVenkateswaran-2026 asked RM-8318 commented

ADF - REST API Bearer token

We are intending to use ADF to extract data from a REST API data source (onelogin) and populate the data to a file in the azure blob. the REST API for user list (source) requires a bearer token. using a pipeline we are successfully generate a token (using POST method) and store the output from onelogin token api to a to a file. Can this token read from the file and passed as a parameter on to the actual GET method for another API (users for ex)?

azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SaurabhSharma-msft avatar image
0 Votes"
SaurabhSharma-msft answered RM-8318 commented

Hi @raghunandanvenkateswaran-2026,

Thanks for using Microsoft Q&A !!
Is there any specific reason you are trying to store the token to a file.
You can instead get the token using one Web Activity and then use token from the activity output to another Web Activity or use Copy Data with Http linked service for your GET method.

I do not have any Onelogin API to share you as example but you see below ADF where I have used Web Activity with Copy Data (copy data from rest API to a file on storage)-
134483-bearertokenwithcopydata.gif
Please let me know if you have any questions.

Thanks
Saurabh


· 9
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for this! Will certainly help with our POC.

1 Vote 1 ·

Thank youSaurabh Sharma, for the suggestion to use web activity. I was looking to store the token, in the hope that a paginated rest api will require multiple calls thus mak in ng it easier.
But certainly web activity and passing the output helps.
Regards raghu

0 Votes 0 ·
PradhanCeepon-8248 avatar image PradhanCeepon-8248 RaghunandanVenkateswaran-2026 ·

Did you found a way to get the token or secret key from key vault . I am new to Azure . is there a way to get the client secret with more activity prior to get bearer token . ??

1 Vote 1 ·
SaurabhSharma-msft avatar image SaurabhSharma-msft RaghunandanVenkateswaran-2026 ·

@raghunandanvenkateswaran-2026 Ok, got it.
Please let me know if you find above reply useful. If yes, do click on 'Mark as answer' link in above reply. This will help other community members facing similar query to refer to this solution.

Thanks,
Saurabh

0 Votes 0 ·

@raghunandanvenkateswaran-2026,
Hi ,

Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

Thanks
Saurabh

0 Votes 0 ·

This WAS great however the Web Activity does not have a body field for GET?

0 Votes 0 ·

So you store client secret in the in the activity. That looks dangerous, especially if you then push this into a shared repository.
Any way of getting client details from the Vault?

0 Votes 0 ·

Hi, That was very helpful.

I have successfully created the WEB activity and generate the token.

I am having doubts on how to create the HTTP link service for the copy statement.

I give the GET service address and Anonymous authentication.

Should I provide any parameters to read the bearer token and authenticate?

The issue I am having is : " The credential to read http file is invalid"

If you could provide more details on how your are creating the link service, and the parameters used on it and dataset would be very helpful.

Thank you

0 Votes 0 ·
Show more comments
kamleshparmar-3522 avatar image
0 Votes"
kamleshparmar-3522 answered

@SaurabhSharma-msft Thank you for the help but how to connect take the output of web activity to copy activity and what if we have multiple api to call with that same token acess.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.