Forum Discussion

ImkeF's avatar
ImkeF
Community Champion
2 years ago
Solved

Where are the authentication settings for dataflow refresh from within a pipeline?

Hi there,
I am searching for the settings that determine the authentication for a dataflow gen2 that is triggered from within a pipeline.
Getting auth-error when refreshed through a pipeline, but manual refresh, scheduled refresh in Power BI as well as dataflow refresh action through Power Automate all work fine. Just the refresh trigger through a fabric pipeline throws below error.
Where can I adjust the settings that fix the auth here?

Get access token from User Auth credential failed. Error message: Failed to retrieve access token with exception: Microsoft.DataTransfer.Common.Shared.HybridDeliveryException: Failed to get UserAuth access token. The error message is: AADSTS700003: Device object was not found in the tenant 'xxxxx' directory. Trace ID: xxxx Correlation ID: xxxxx Timestamp: 2024-07-17 18:45:05Z The returned error contains a claims challenge. For additional info on how to handle claims related to multifactor authentication, Conditional Access, and incremental consent, see https://aka.ms/msal-conditional-access-claims. If you are using the On-Behalf-Of flow, see https://aka.ms/msal-conditional-access-claims-obo for details.. ---> Microsoft.DataTransfer.TokenService.Client.Models.ErrorResponseException: Operation returned an invalid status code 'BadRequest'
at Microsoft.DataTransfer.TokenService.Client.TokensOperations.<AcquireWithHttpMessagesAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DataTransfer.TokenService.Client.TokensOperationsExtensions.<AcquireAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DataTransfer.TokenService.Client.TokenServiceClientHelper.<>c__DisplayClass11_0.<<AcquireTokenAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DataTransfer.TokenService.Client.TokenServiceClientHelper.<>c__DisplayClass12_0`1.<<InvokeWrapper>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DataTransfer.TokenService.Client.TokenServiceClientHelper.<InvokeWrapper>d__12`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DataTransfer.TokenService.Client.TokenServiceClientHelper.<AcquireTokenAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DataTransfer.Common.Auth.UserAuthAuthenticator.ClientWrapper.AcquireToken(String userAuthName, AcquireTokenRequestProperties properties, Boolean executionContextRestricted)
at Microsoft.DataTransfer.Common.Auth.UserAuthAuthenticator.AcquireToken(ClientWrapper client, Boolean executionContextRestricted)
--- End of inner exception stack trace ---
at Microsoft.DataTransfer.Common.Auth.UserAuthAuthenticator.AcquireToken(ClientWrapper client, Boolean executionContextRestricted)
at Microsoft.DataTransfer.Common.Auth.UserAuthAuthenticator.GetAccessTokenResult(String resourceUri, Boolean executionContextRestricted)
at Microsoft.DataTransfer.Execution.RefreshDataflowActivity.RefreshDataflowClient.GetUserAuthenticationKey(CancellationToken cancellationToken).

  • thanks for the feedback,
    as it turned out, I had to disconnect all connectors (from within the dataflow) and re-connect and then the refresh through the pipeline worked as well.

2 Replies

  • ImkeF's avatar
    ImkeF
    Community Champion

    thanks for the feedback,
    as it turned out, I had to disconnect all connectors (from within the dataflow) and re-connect and then the refresh through the pipeline worked as well.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi ImkeF ,

    First you need to make sure that the pipeline is configured with the correct authentication method, you can refer to this official document: Use a dataflow in a pipeline - Microsoft Fabric | Microsoft Learn

    As you can see from the error message, it's probably something to do with multiple authentication or some other access requirement, so I think you need to make sure that the service body or user account used by the pipeline has the permissions needed to access the data stream.

    You can check out this documentation for more details: Set up your Azure Data Lake Storage Gen2 connection - Microsoft Fabric | Microsoft Learn

     

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.