What’s new in Fabric User Data Functions? Ignite 2025 edition
User Data Functions has been hard at work to bring you the functionality you need to tie together your Fabric architectures and create robust data solutions. This blog post will introduce the latest features in Fabric User Data Functions for Microsoft Ignite 2025.
The following are the features and integrations that are now available in your User Data Functions items:
- Fabric Activator support
- Variable Library integration
- Azure Key Vault support
- Cosmos DB support
First, let’s talk about what you can use Fabric User Data Functions for. You can also skip to the updates if you are already familiar with this feature.

What is Fabric User Data Functions?
User Data Functions is an item that allows you to create fully managed Python functions to run in your Fabric architectures. You can use functions to reuse your business logic across your Fabric items. User Data Functions supports different Fabric integrations, such as data sources, Power BI reports, Pipelines, Notebooks, Airflow and more. Your data architectures will benefit from having a centralized place to maintain and update your logic.
For instance, consider this simplified data architecture where the web application on the left generates user activity data. Your unstructured data will flow from a Lakehouse into a structured Warehouse and can interact with Pipelines or Notebooks along the way.

While you have the option to embed your logic in any item, you can end up with many one-off solutions that will eventually become challenging to manage and maintain.

Instead, you can create functions to capture your logic in a single place. This simplifies making improvements and managing your resources. Your functions can also interact with external services and APIs which you can use to enrich your data or integrate with external systems.

What is new in Fabric User Data Functions?
The following features are now available in your Fabric User Data Functions. This list includes new features and recently announced features.
Fabric Activator integration (Preview)
Run your functions from an Activator rule!

You can now invoke User Data Functions from the rules in your Fabric Activator items. This feature allows you to create functions to process events from any source, including Fabric events and OneLake events.

This feature supports mapping properties from your event data into your function parameters. You can use these properties to determine your event processing logic or to determine a custom destination for your events. You can configure your Activator rules with any functions – there’s no need for any special configurations inside of your User Data Functions item.
Variable Library item integration
Store and use your variable sets across your functions!
You can now connect to your Variable Library items using the Manage connections experience in the Functions portal. You can use this to store configuration settings, global constants, environment variables, and much more!

One useful way to leverage this integration is to store the names of the tables that you can connect to depending on your environment. For example, the default value set is targeting a Fabric Cosmos DB container used while the medicine delivery event processing functions, creatively called LuisDevContainer is developed.
Once the functions are ready, activate the alternative value set with staging, more serious, environment called MedicineDeliveries. This approach is useful because there is no need to make any code changes to switch environments. This is a code sample of how to read those values:
@udf.connection(alias="TestEnvironment", argName="varLib")
@udf.function()
def accessVariableLibrary(varLib: fn.FabricVariablesClient) -> str:
containerName = varLib.getVariables().get("CosmosDbContainer")
return containerName
The key elements are the @udf.connection( ... ) decorator where the newly created Variable Library connection for, and the varLib.getVariables().get("CosmosDbContainer") call where it can be retrieved by value name.
Azure Key Vault support
Securely access your secrets from your functions!
Using a Key Vault is the best practice way to use secrets, such as API keys, passwords, and certificates. Azure Key Vault is one of the most popular services to securely store and retrieve your secrets in your code. With this method, you can access any Key Vault that your user account in Fabric has access to. Make sure to assign Reader permissions to your account for your secrets.
You can now access your Key Vaults programmatically in your functions using the following code:
@udf.generic_connection(argName="keyVaultClient", audienceType="KeyVault")
@udf.function()
def retrieveNews(keyVaultClient: fn.FabricItem, requestBody:str) -> str:
KEY_VAULT_URL = 'YOUR_KEY_VAULT_URL'
KEY_VAULT_SECRET_NAME= 'YOUR_SECRET'
API_URL = 'YOUR_API_URL'
credential = keyVaultClient.get_access_token()
client = SecretClient(vault_url=KEY_VAULT_URL, credential=credential)
api_key = client.get_secret(KEY_VAULT_SECRET_NAME).value
return "Success"
The key elements in this code are the @udf.generic_connection(...) decorator at the top, the SecretClient(...) method call and the client.get_secret(...) code line where you get your secrets by name.
Refer to the Connect to Azure Key Vault using a generic connection documentation to learn more.
Cosmos DB support
Store and access JSON objects without creating a schema!
You can now access both Fabric and Azure Cosmos DB databases from your functions using a similar approach to the Key Vault integration.

For those of you who don’t know Cosmos DB, it’s the one of the easiest databases to set up because it does need a table creation step. You can simply create a new container to logically separate your documents and then store any data in a JSON object format. Cosmos DB will internally organize and index your data so it’s readily available for you to search.
To get started, you can navigate to the ‘Insert sample’ feature in your Portal editor and select any of the Cosmos DB samples. Once you create your Fabric Cosmos DB database and container, you can retrieve the connection URI by visiting the settings page in your Cosmos DB item.

For example, this sample shows how to create a new document:
from fabric.functions.cosmosdb import get_cosmos_client
from azure.cosmos import exceptions
@udf.generic_connection(argName="cosmosDb", audienceType="CosmosDB")
@udf.function()
def insert_product(cosmosDb: fn.FabricItem) -> list[dict[str, Any]]:
COSMOS_DB_URI = "{my-cosmos-artifact-uri}"
DB_NAME = "{my-cosmos-artifact-name}"
CONTAINER_NAME = "SampleData"
cosmosClient = get_cosmos_client(cosmosDb, COSMOS_DB_URI)
database = cosmosClient.get_database_client(DB_NAME)
container = database.get_container_client(CONTAINER_NAME)
productId = "8a82f850-a33b-4734-80ce-740ba16c39f1"
iso_now = datetime.now(timezone.utc).isoformat() + "Z"
# Create the product document
product = {
"id": productId,
"docType": "product",
"timestamp": iso_now
}
return container.create_item(body=product)
The key parts of this sample are the @udf.generic_connection(...) decorator at the top, the get_cosmos_client(...) line to create a new client and the COSMOS_DB_URI variable.
To learn more, refer to the generic connections documentation.
Resources
If you made it this far, thank you for reading! Here are some more resources for you to get started:
- Generic connections for Fabric items or Azure resources
- The Service details and limitations of Fabric User Data Functions
- New to User Data Functions?
- Refer to the Create a Fabric User data functions item documentation.