Error on source dataset with REST Connetor in Azure Synapse pipeline

nam wam 1 Reputation point
2022-05-08T02:14:06.817+00:00

I am using Copy and transform data from and to a REST endpoint by using Azure Data Factory to load a file from my Box.com account to an Azure Data Lake Gen2 (ADLSGen2) container. I'm using Synapse pipeline whith source as the REST connector where I've identified the Base URL in step3 of the tutorial to be https://api.box.com/2.0/files/:file_id/content where file_id is the id of my file stored in Box.com (ref: here).

When I run the pipeline, I get the following error. Question: What I may be doing wrong and how can the issue be resolved?

"errorCode": "2200",  
    "message": "Failure happened on 'Source' side. ErrorCode=RestSourceCallFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The HttpStatusCode 401 indicates failure.\nRequest URL: https://api.box.com/2.0/files/:984786751561/content\nResponse payload:,Source=Microsoft.DataTransfer.ClientLibrary,'",  
    "failureType": "UserError",  
    "target": "Copy data1",  
    "details": []  
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,651 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,072 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,437 Reputation points Microsoft Employee
    2022-05-09T21:12:24.36+00:00

    Hello @nam wam ,

    Thanks for the question and using MS Q&A platform.

    From the error code HTTP 401 it seems like the authorization is not valid, and the request operation fails. Could you please make sure your linked service is configured with correct values and a valid Bearer token is passed through Authorization.

    Another thing I would like to double check is your Base URL used in the Linked service. Please use https://api.box.com/ as your base URL in your linked service and Use the Relative URL in your dataset and see if that helps to resolve the issue. Here is a reference thread where a similar issue arises due to misconfiguration of the Base URL in the connector. - https://learn.microsoft.com/en-us/answers/questions/794319/index.html

    Since the error code complains about authorization, I would recommend giving a try using other tools like POSTMAN to see if you were able to establish a successful connection. And if it works with POSTMAN, please make sure to use similar configurations in ADF REST connector.

    Another thing to check is the Bearer Access token passed in the Authorization. Please validate if a correct access token is passed while making the REST call.

    Please refer to this troubleshooting guide related to this error message and see if it helps - Error code: RestSourceCallFailed

    200451-image.png

    Hope these inputs help. Please keep us posted how it goes.

    Thank you.

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

    • 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
    0 comments No comments