How to set additional headers in Data Store Read Settings?

Abhijit Shrikhande 382 Reputation points
2022-09-15T21:28:00.643+00:00

I am trying to import a schema based on a REST API call. In order to call this API, I need to send additional headers.

The syntax that I have tried so far is

"Authorization":"Bearer sometoken"
and
'Authorization':'Bearer sometoken'

Is there some other syntax that the data store read settings is expecting?

241625-datastorereadsettings.png

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

Answer accepted by question author
  1. AnnuKumari-MSFT 34,566 Reputation points Microsoft Employee Moderator
    2022-10-25T05:18:39.73+00:00

    Hi @Abhijit Shrikhande ,

    Apologies for the inconvenience you had to face.

    Kindly check the below syntax to add the additional header : @{concat('Authorization: Bearer ', activity('GetBearerToken').output.access_token)} . This would convert the input string as : "Authorization: Bearer <AccessToken>"

    253735-image.png

    Hope it helps. If this is not the solution you implemented, I would request you to share the solution with the community so that it would be helpful for the community members facing similar issues .

    If the suggested response helped you, please do consider clicking Accept Answer and Up-Vote for the same as accepted answers help community as well.
    Looking forward to your response. Thankyou.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,566 Reputation points Microsoft Employee Moderator
    2022-09-19T05:04:14.24+00:00

    Hi @Abhijit Shrikhande ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your question here.

    Since you have already resolved the issue you were facing while trying to make a REST API call using azure data factory pipeline , I understand while trying to import schema you are getting error to provide headers.

    You could consider using REST API dataset to point to a REST API URL and make the API call using Copy data activity. Or, you can directly provide the REST API URL inside Web activity to make the API call. Inside the web activity or copy activity , we have the option to provide additional headers.

    For more details , kindly check :
    Web activity in ADF
    Copy and transform data from and to a REST endpoint by using Azure Data Factory

    If this is not how you resolved your issue, I would encourage you to kindly share your workaround so that it would be helpful for the community members facing similar issues . Thankyou in advance for your efforts in doing so. Looking forward to your response.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.