Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hi I'm trying to run UDF funtion and integarting it with azure open ai.
I'm getting the below error during invocation can someone please help?
{
"functionName": "AISuggestion",
"invocationId": "00000000-0000-0000-0000-000000000000",
"status": "Failed",
"errors": [
{
"errorCode": "WorkloadException",
"subErrorCode": "NotFound",
"message": "User data function: 'AISuggestion' invocation failed."
}
]
}
My code
------------------------------------------------------------------------------------------
Solved! Go to Solution.
Hi @DiKi-I ,
If you still face the issue then please consider raising a support ticket for further assistance.
To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide: How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank You.
Hi @DiKi-I ,
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.
still getting the same error.
Hi @DiKi-I ,
If you still face the issue then please consider raising a support ticket for further assistance.
To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide: How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank You.
Hi @DiKi-I ,
Thank you for your valuable inputs, @burakkaragoz you’ve highlighted the key points perfectly. To provide further clarity, I’d like to elaborate on a few aspects that might help resolve the issue.
The WorkloadException with the NotFound sub error for your AISuggestion UDF indicates that the function isn’t recognized or isn’t available in the environment where it’s being called. Since your UDFs are running fine, but you're encountering issues specifically with Azure OpenAI integration, it likely involves deployment challenges, environment settings, or restrictions on external API calls.
Key Considerations:
FYI: Connect to data sources - Fabric User data functions (Preview) - Microsoft Fabric | Microsoft Learn
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
I'm getting workload exception.
{
"functionName": "AISuggestion",
"invocationId": "00000000-0000-0000-0000-000000000000",
"status": "Failed",
"errors": [
{
"errorCode": "WorkloadException",
"subErrorCode": "NotFound",
"message": "User data function: 'AISuggestion' invocation failed."
}
]
}
Looks like the error is saying the function AISuggestion couldn't be found or isn't available in the current context. This might happen if:
I'd suggest double-checking the function name and making sure it's available in the environment you're running this from. Also, if this is a custom function, make sure it's published and accessible to the workspace you're using.
Hi @DiKi-I ,
Thanks for raising this – there’s been some confusion around User Data Functions in Fabric, especially since they’re still in preview and not fully rolled out in all environments.
Feature Availability
Enable the UI Option (Workaround)
&ArtifactFunctionSet=1
Use Visual Studio Code (Optional)
Known Issues
Let me know if you’re trying to use UDFs for a specific use case (e.g., calling APIs, transforming data, etc.) – I can help tailor the setup.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
I'm able to run udf its just that when I'm testing it with openai its not working.
Good to hear that the UDF itself is running. Regarding the issue with OpenAI, here are a few things to check:
Authorization: Bearer YOUR_API_KEY
Hello, I'm facing the exact same problem since yesterday.
The really curious behaviour is that yesterday I've published the function and got the same error. Today I re-run the function and it get executed correctly. I made a couple of changes, re-published and again the error is being raised.
Yes, I'm basically doing something very similar to what your function is doing, I'm not working with SQL ATM. Looking at the code you're trying to re-create the example from transanalytical task flows.
Yes, I'm using the udf example with the openai. But it doesn't seem to work. I will try again with some simple use cases.
are you calling openai from udf?
User | Count |
---|---|
72 | |
40 | |
8 | |
7 | |
4 |
User | Count |
---|---|
93 | |
68 | |
21 | |
9 | |
9 |