How to fix"errorCode": "2100", "message": "ErrorCode=AdlsGen2OperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ADLS Gen2 operation failed for: Failed to get access token by using service principal. Error

Shohid Rahman 30 Reputation points
2023-10-02T13:40:07.6833333+00:00

Whenver I run a pipeline in synapse with a linked service I get this error. Bear in mind Ive used the default one which authenticates itself with a self managed identity, also I tried creating another one which to use a service principal. But I get the same error for both.

{     "errorCode": "2100",     "message": "ErrorCode=AdlsGen2OperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ADLS Gen2 operation failed for: Failed to get access token by using service principal. Error: request_timeout, Error Message: Request to the endpoint timed out. A task was canceled. .. Account: 'Bobstorageaccount'. FileSystem: 'bc2adlsfolder'. Path: 'deltas.manifest.cdm.json'..,Source=Microsoft.DataTransfer.ClientLibrary,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to get access token by using service principal. Error: request_timeout, Error Message: Request to the endpoint timed out. A task was canceled. .,Source=Microsoft.DataTransfer.Common,''Type=Microsoft.Identity.Client.MsalServiceException,Message=Request to the endpoint timed out.,Source=Microsoft.Identity.Client,''Type=System.Threading.Tasks.TaskCanceledException,Message=A task was canceled.,Source=mscorlib,'",     "failureType": "UserError",     "target": "Entities",     "details": [] }

blob storage data contributor has been enabled for the managed identity / app reg.
Public network access is enabled
A private endpoint exists and is approved.

So far no one online has been of help

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.
5,373 questions
{count} votes

Accepted answer
  1. KranthiPakala-MSFT 46,642 Reputation points Microsoft Employee Moderator
    2023-11-06T17:48:51.7+00:00

    @Shohid Rahman

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others Opens in new window or tab", I'll repost your solution in case you'd like to accept the answer Opens in new window or tab.

    Error Message:

    {
      "errorCode": "2100",
      "message": "ErrorCode=AdlsGen2OperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ADLS Gen2 operation failed for: Failed to get access token by using service principal. Error: request_timeout, Error Message: Request to the endpoint timed out. A task was canceled. .. Account: 'Bobstorageaccount'. FileSystem: 'bc2adlsfolder'. Path: 'deltas.manifest.cdm.json'..,Source=Microsoft.DataTransfer.ClientLibrary,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to get access token by using service principal. Error: request_timeout, Error Message: Request to the endpoint timed out. A task was canceled. .,Source=Microsoft.DataTransfer.Common,''Type=Microsoft.Identity.Client.MsalServiceException,Message=Request to the endpoint timed out.,Source=Microsoft.Identity.Client,''Type=System.Threading.Tasks.TaskCanceledException,Message=A task was canceled.,Source=mscorlib,'",
      "failureType": "UserError",
      "target": "Entities",
      "details": []
    }
    

    Issue:

    • Whenver I run a pipeline in synapse with a linked service I get this error. Bear in mind Ive used the default one which authenticates itself with a self managed identity, also I tried creating another one which to use a service principal. But I get the same error for both.

    Solution:

    • Turns out this issue was that data exfiltration was enabled on the workspace and once new workspace was created with data exfiltration disabled the issues were solved.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    I hope this helps!

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Shohid Rahman 30 Reputation points
    2023-11-02T10:11:54.5033333+00:00

    Problem solved a while back.

    Turns out this issue was that data exfiltration was enabled on the workspace and once I created a new workspace with it disabled the issues were solved.

    1 person found this answer helpful.
    0 comments No comments

  2. Shohid Rahman 30 Reputation points
    2023-11-02T10:12:06.7033333+00:00

    Problem solved a while back.

    Turns out this issue was that data exfiltration was enabled on the workspace and once I created a new workspace with it disabled the issues were solved.

    1 person found this answer helpful.
    0 comments No comments

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.