How to solve the error in ADF- Rest call failed with client error

Ananthu Sreedhar 0 Reputation points
2024-07-23T12:00:31.0466667+00:00

I am trying to copy data from share point using graph API. I am able to see the data through postman (by providing the authorization through access token), but when I use the same URL inside the Rest API dataset (source) in a copy activity, I am getting error like thisUser's image

I have also tested the linked service connection and it is working fine with the base url as "https://graph.microsoft.com/v1.0" and I provided the remaining url in the dataset as relative url

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,987 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,663 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,675 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 24,376 Reputation points
    2024-07-23T20:18:20.6533333+00:00

    Based on this old thread :

    This error occurs when the REST call made by ADF to retrieve data from the specified URL fails because the resource is not found. Here are some steps you can take to troubleshoot the issue:

    • Verify the URL: Double-check the URL you've configured in the ADF source settings for typos or incorrect formatting. Ensure the URL points to the exact location of the data you intend to retrieve from the REST API.
    • Test the URL with a REST client: Use tools like Postman or curl to test the URL independently and see if it returns the expected data. This helps isolate if the issue lies with the URL itself or the way ADF interacts with it.
    • Check authentication: If the REST API requires authentication, ensure the necessary credentials (e.g., access token) are provided correctly in the ADF linked service configuration.
    • Firewall or Network Access: The error message also shows a “forbidden” error and an IP address. It’s possible that the IP address is being blocked by a firewall or doesn’t have network access to the URL.
    • Examine API documentation: Refer to the documentation for the specific REST API you're using. The documentation might specify requirements or restrictions that could be causing the 404 error.

    Hope this helps. Do let us know if you any further queries.


Your answer

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