Forum Discussion

Lukas_Ng's avatar
Lukas_Ng
Advocate I
6 months ago
Solved

Issue when Invoking User Data Function in Pipeline - Tenant not authorized for cluster

Dear all,

 

I have a User Data Function defined as below: 

 

This function simply creates a file in the Lakehouse based on the input file name and path.

 

However, when I invoke this function in a pipeline using the Org account option for the connection, the function fails with the following error.

 

The invoked function run with error:

 

 

Error code 2492

 

Failure type User configuration issue

 

Details Data function set execution failed with error message - 'Failed to get udf metadata with https status code - Forbidden & reason - {"error":{"code":"InvalidRequest","message":"Tenant not authorized for cluster"}}'

 

But when I invoke it in pipeline, it worked normally:

 

 

 

I have tried creating another User Data Function and also signing in again for the UDF activity’s connection, but the issue still persists.

 

Could you please help advise what might be causing this problem?. Thank you all!

 

Best Regards.

  • Hello Lukas_Ng,

    We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.

    Thank you.

13 Replies

  • I am facing the same issue in Production deployment and need immediate help in fixing it . Can the team guide here asap? Raised support case for the same

  • Hello Lukas_Ng 

     

    You can run Fabric User Defined Functions in a Fabric data Pipeline, as documented in this Microsoft doc.

     

    Utilize User Data Functions in Data pipelines with the Functions activity (Preview) | Microsoft Fabric Blog | Microsoft Fabric

     

    However, User Defined Functions in Microsoft Fabric is available in specific regions. Please check your Workspace and Capacity region is in one of these. 

     

    New regions supported for Fabric User Data Functions | Microsoft Fabric Blog | Microsoft Fabric

     

    That error almost always means the User Data Functions (UDF) service isn’t enabled/available for the region/capacity your workspace is bound to, or the tenant hasn’t been allowed to use that cluster (common during/after preview rollouts).
     

     

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

    Hello Lukas_Ng,

    We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.

    Thank you.

    • Lukas_Ng's avatar
      Lukas_Ng
      Advocate I

      I have tested it again this morning. It's doing well, thank you for your assistance.

       

  • Hi Lukas_Ng ,

     

    Fabric Pipelines cannot execute User Data Functions that require Spark or Lakehouse access using an Organizational account.This is a current Fabric platform limitation

     

    The pipeline runs UDFs in a restricted, headless compute context that:

    • Has no Spark cluster authorization
    • Cannot access Lakehouse APIs
    • Fails before your code executes

    Why it works outside the pipeline

    When you run it directly:

    • Fabric uses your interactive Spark session

    • Your user identity is authorized

    • Lakehouse access works

    Pipeline execution uses a different security and compute mode

     

    What you should do instead (Fabric-recommended)

    Use a Notebook activity in the Pipeline

    This is the correct and supported approach.

    Notebook activities:

    • Run on an authorized Spark cluster

    • Can write to OneLake / Lakehouse

    • Accept parameters (file name, path, timestamp)

    • Are designed for data engineering steps

    If this post helps, then please appreciate giving a Kudos or accepting as a Solution to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    • Erik_Huuskonen's avatar
      Erik_Huuskonen
      New Member

      Hi, ssrithar 

       

      I noticed this same error began at 01/23/2026, but pipelines calling UDFs that interact with Lakehouses worked previously. Are there some new changes to UDF authorization, like them going from Preview to GA?

      • IanSS's avatar
        IanSS
        Regular Visitor

        We started seeing this same error at 1/22/2026 around 3:00 AM EST on a pipeline that has been running successfully since the beginning of December. The UDF was used to call a REST API to refresh the metadata for a SQL endpoint, but after testing on a basic "Hello Fabric" UDF the error still exists, so I don't think this is related to spark or lakehouses. We were waiting 24 hours to see if it resolved itself as part of a Fabric update, but as of this morning the issue still exists for us.

    • HelloWorld12's avatar
      HelloWorld12
      Regular Visitor

      I believe this is 100% GPT generated and false.

       

      Also, as other users have claimed, the UDF not being able to be called from the pipeline has started from 23 Jan. Some engineer messed up something.