Microsoft Fabric Updates Blog

Service principal and private library support for Fabric User data functions

Fabric user data functions let’s you create and run custom functions tailored specifically to your organization’s needs. These functions make it easy to facilitate data modernization across your organization.  I am excited to announce two new features for User data functions:  

New features:

  1. Authenticate with Service principal names (SPN): This will allow you to securely invoke a function with SPN from an external application. By using service principals, you can connect to your data sources securely while minimizing the risks of human error and identity-based vulnerabilities. To learn more about service principals, see Application and service principal objects in Microsoft Entra ID
  1. Upload private libraries: This will allow you to bring your own private libraries built for your organization business needs. Using private libraries, you can now define functions that are internal to your organization and streamline your business processes.  

Using service principal names (SPN) with user data functions

Service Principal Names (SPN) offer a way to achieve  the balance of security and convenience by allowing a service-level identity to run your functions. Using SPN with User data functions can enable enterprises to create efficient, automated, and secure solutions tailored to their needs.  

How do I set up SPN for user data functions?

If you are planning on using Service Principal or Managed Identity, follow these steps.

  1. Create a service principal, assign roles, and create secret using Azure.
  2. Ensure the tenant admin can enable Service principals can use Fabric APIs in Fabric Admin portal.
Enable SPN in Admin portal

Select Manage access add SPN to give access to the workspace. You can also update the access permissions on the artifact level. Note that a user with Administrator workspace role can only grant access for an SPN.

Add SPN using manage access to the workspace

Upload private libraries

You can now upload a private .whl file represents a private library to a user data functions item. These private libraries are code created by you or your organization. Data engineering can be challenging, especially with data quality and complex analytics. Private libraries help streamline work and enable proprietary code use within a team securely. Fabric User data functions now allow custom library uploads in .whl format, containing scripts or modules for internal business logic. This can improve developer productivity and automate business processes.  To learn more, refer to How to manage public and private libraries.

Upload a private library to a user data functions item
Upload a private library for a user data functions

Limitations of private libraries

  • The .whl file size must be less than 30MB.
  • The .whl file must be OS agnostic. If the file is specific to an operating system for example numpy-2.2.2-cp311-cp311-linux_armv6l.whl, it will fail to upload.

Conclusion

To sum up, using Service Principal and Managed Identity, along with private libraries for Fabric user data functions, makes working with data much easier and more secure. These features let developers customize pipelines and use their own code to solve problems, boosting productivity in teams.

Related blog posts

Service principal and private library support for Fabric User data functions

May 23, 2025 by Ryan Majidimehr

Microsoft Build 2025 delivered a powerful vision for the future of data and AI, with Microsoft Fabric and Power BI at the heart of the story. From AI-powered productivity with Copilot to deep integration with Cosmos DB, this year’s announcements reinforced Microsoft’s commitment to unifying the data experience across roles, tools, and industries. Fabric: The … Continue reading “That’s a wrap for Build 2025!”

May 22, 2025 by Eren Orbey

With AI-powered capabilities in Data Wrangler, you can now do even more to accelerate exploratory analysis and data preparation in Fabric.