Forum Discussion
user data function in fabric
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
------------------------------------------------------------------------------------------
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.
14 Replies
- thetom88Frequent Visitor
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.
- thetom88Frequent Visitor
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.
- DiKi-IPost Partisan
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.
- DiKi-IPost Partisan
are you calling openai from udf?
- burakkaragozSuper User
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.
A few things to check:
Feature Availability
- Make sure your workspace is on a supported Fabric capacity (F64 or higher).
- UDFs are still in private preview for some tenants, so they might not appear in the UI by default.
Enable the UI Option (Workaround)
- Try appending this to your Fabric URL and refresh the page:
&ArtifactFunctionSet=1
- This sometimes forces the UI to show the “User Data Function” option under “New Item”.
Use Visual Studio Code (Optional)
- You can also create and manage UDFs using the Microsoft Fabric VS Code extension, which gives more control and visibility.
Known Issues
- There’s a known issue where UDFs don’t show up in the pipeline function activity pane. Microsoft is working on it [1].
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.
References- DiKi-IPost Partisan
I'm able to run udf its just that when I'm testing it with openai its not working.
- burakkaragozSuper User
Good to hear that the UDF itself is running. Regarding the issue with OpenAI, here are a few things to check:
1. Network Access
- Make sure your UDF environment has outbound internet access. Some Fabric environments (especially in secured or restricted tenants) might block external HTTP calls.
2. Authentication
- If you're calling OpenAI’s API, ensure you're passing the correct API key in the header:
Authorization: Bearer YOUR_API_KEY
- Also double-check the endpoint URL (e.g., https://api.openai.com/v1/completions or chat/completions depending on the model).
3. Timeouts and Payload
- Keep the payload small for testing. Some environments have strict timeout limits for external calls.
- Try a simple prompt first to validate the connection.
4. Error Details
- If you’re getting a specific error message or status code, feel free to share it here. That’ll help narrow it down quickly.
- DiKi-IPost Partisan
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."
}
]
}- burakkaragozSuper User
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:
- The function isn't deployed or registered properly in your environment.
- You're calling it from a workspace or context where it's not accessible.
- There's a typo or mismatch in the function name.
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.
- V-yubandi-msftCommunity Support
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:
- According to Microsoft Fabric documentation, UDF are still in preview as of May 2025.
- This can result in inconsistent deployment, limited availability in certain tenants, or restrictions on external HTTP calls (such as calls to Azure OpenAI) in secured environments.
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.
- V-yubandi-msftCommunity Support
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.
- DiKi-IPost Partisan
still getting the same error.
- V-yubandi-msftCommunity Support
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.
- DiKi-IPost Partisan
Has anyone used this feature and is it working?