Forum Discussion

slachmuyldera's avatar
slachmuyldera
Regular Visitor
1 year ago
Solved

cannot run t-sql notebook in pipeline

I am trying to create a pipeline that runs  a series of t-sql notebooks. The notebooks run fine by themselves, but when I run it from the pipeline I receive this error:
 

Notebook execution failed at Notebook service with http status code - '200', please check the Run logs on Notebook, additional details - 'Error name - SqlDwException, Error value - DMS workload error in executing code cell: [Internal error MwcTokenValidationException. (ErrorCode=MwcTokenValidationException) (HTTP 401)]. DatamartId: xxxx. Data warehouse trace id: xxxx' :

 

Others have reported being able to do this activity just fine. Any ideas?

  • Hi slachmuyldera 


    Welcome to the Microsoft Fabric Forum,

     

    The error you are encountering, MwcTokenValidationException (HTTP 401), usually indicates a token validation issue related to authentication or authorization.

     

    When a notebook is triggered through a pipeline in Microsoft Fabric, it uses a system-assigned managed identity or a service principal for authentication. If this identity or principal lacks the necessary permissions on the Datamart or Warehouse, the authentication will fail, even if the notebook runs successfully when executed manually.

     

    Verify the permissions such as the service principal or user account running the pipeline has the appropriate read and write permissions to access the data warehouse.

     

    Additionally, upgrading to the latest stable runtime version can sometimes resolve execution delays or metadata commit inconsistencies.

     

    There is a known issue with the Distributed Query Processor (DQP) on the Microsoft side that could contribute to this behavior.

     

    For further reference, a similar issue has been discussed in the following thread:

    Solved: Unable to access Data Warehouse: MwcTokenValidatio... - Microsoft Fabric Community

     

    If this information helps resolve your issue, kindly consider marking this response as the Accepted Solution, as it may assist other community members facing similar challenges.

     

    Thank you for being part of the Microsoft Fabric Community.

7 Replies

  • QixiaoWang's avatar
    QixiaoWang
    Microsoft Employee

    suggest to file a support ticket on this. thanks 

  • v-karpurapud's avatar
    v-karpurapud
    Community Support

    Hi slachmuyldera 


    Welcome to the Microsoft Fabric Forum,

     

    The error you are encountering, MwcTokenValidationException (HTTP 401), usually indicates a token validation issue related to authentication or authorization.

     

    When a notebook is triggered through a pipeline in Microsoft Fabric, it uses a system-assigned managed identity or a service principal for authentication. If this identity or principal lacks the necessary permissions on the Datamart or Warehouse, the authentication will fail, even if the notebook runs successfully when executed manually.

     

    Verify the permissions such as the service principal or user account running the pipeline has the appropriate read and write permissions to access the data warehouse.

     

    Additionally, upgrading to the latest stable runtime version can sometimes resolve execution delays or metadata commit inconsistencies.

     

    There is a known issue with the Distributed Query Processor (DQP) on the Microsoft side that could contribute to this behavior.

     

    For further reference, a similar issue has been discussed in the following thread:

    Solved: Unable to access Data Warehouse: MwcTokenValidatio... - Microsoft Fabric Community

     

    If this information helps resolve your issue, kindly consider marking this response as the Accepted Solution, as it may assist other community members facing similar challenges.

     

    Thank you for being part of the Microsoft Fabric Community.

  • v-karpurapud's avatar
    v-karpurapud
    Community Support

    Hi slachmuyldera 

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.

  • v-karpurapud's avatar
    v-karpurapud
    Community Support

    Hi slachmuyldera 

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

    Thank you.

    • slachmuyldera's avatar
      slachmuyldera
      Regular Visitor

      I am in the process of trying to get some response back from support. So, no solution yet.

      • v-karpurapud's avatar
        v-karpurapud
        Community Support

        Hi slachmuyldera 

        Thank you for the update. If you have found a solution, please share it here, as it will help other community members facing similar issues. Looking forward to your response.


        Regards,
        Karpurapu D.