Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Lukas_Ng
Advocate I
Advocate I

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

Dear all,

 

I have a User Data Function defined as below: 

Lukas_Ng_4-1768988485424.png

 

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.

 

Lukas_Ng_2-1768988371827.png

The invoked function run with error:

Lukas_Ng_0-1768988992856.png

 

 

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:

Lukas_Ng_5-1768988567040.png

 

 

 

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.

1 ACCEPTED SOLUTION
v-ssriganesh
Community Support
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.

View solution in original post

13 REPLIES 13
Vigneshganesan
Regular Visitor

Issue seems to be resolved now. UDF running successfully on pipelines.

v-ssriganesh
Community Support
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_0-1769485226974.png

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

 

Issue seems to be silently resolved!

Vigneshganesan
Regular Visitor

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

Hi @Vigneshganesan ,

 

Which region are you using for prod deployment. Also are your test and prod in the same region or different ones

North Europe

deborshi_nag
Impactful Individual
Impactful Individual

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 Fabr...

 

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).
 

 

I trust this will be helpful. If you found this guidance useful, you are welcome to acknowledge with a Kudos or by marking it as a Solution.
ssrithar
Resolver II
Resolver II

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!

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.

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?

Thank you guys here to let me know about this issue

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.

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.