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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Capture calling context (workspace, item id, item type) in User Data Functions (UDF)

Today, User Data Functions (UDFs) expose user execution context such as PreferredUsername, Oid, and TenantId. However, there’s no way to see where the UDF was invoked from.

 

It would be very useful if UDFs could also capture the workspace id, item id, and item type of the calling object (e.g., Power BI report, semantic model, data pipeline, notebook, etc.).

 

Why this matters:

  • Improves troubleshooting and auditing of UDF calls

  • Helps distinguish between calls from developer environment vs. production reports

  • Makes it easier to design robust logging for compliance and monitoring

Suggested Implementation:
Extend UserDataFunctionContext with fields such as:

  • WorkspaceId

  • WorkspaceName
  • ItemId

  • ItemName
  • ItemType (e.g., Report, Dataflow, Pipeline, Notebook)

Impact:
This would make UDF logging more transparent and allow developers and admins to track usage across environments with better precision.

Status: New
Comments
frithjof_v
Super User
I'd like to use this for logging of Power BI writeback, to track which report and environment triggered the UDF. And be able to separate between direct invocations from the UDF interface (Test button) and invocations from Power BI.