Forum Discussion
How to programmatically access “Submitted by” (pipeline runner) at pipeline or notebook runtime
Hi Fabric team,
In the Fabric Monitor view, pipeline runs clearly show the “Submitted by” column (see bellow), which correctly reflects the user who manually triggered the pipeline (e.g. Yazdan Aghajanian).
However, I have not been able to access this information programmatically from either:
Pipeline runtime expressions
Notebooks executed by the pipeline
Fabric REST APIs
What I’ve tried (and confirmed):
Pipeline runtime / expressions
There is no system variable or expression (e.g. @pipeline().submittedBy) that exposes the runner identity.Notebook runtime context
mssparkutils.runtime.context["userName"]This returns the execution identity, not the pipeline submitter, when the notebook is invoked by a pipeline.
Fabric REST APIs
GET /v1/workspaces/{workspaceId}/items/{pipelineItemId}/jobs/instances
GET /v1/workspaces/{workspaceId}/items/{pipelineItemId}/jobs/instances/{instanceId}
- details = fabric_get( f"https://api.fabric.microsoft.com/v1/workspaces/{workspace_id}/items/{pipeline_item_id}/jobs/instances/{instance_id}")
Activity endpoints under the instance
These APIs only return execution metadata (status, invokeType, timestamps, rootActivityId, etc.).
There is no field such as submittedBy, createdBy, or user principal information.Azure Monitor / Graph APIs
Not usable in our tenant (ARM/Graph token minting is blocked), and even then, this feels indirect given the data already exists in Fabric Monitor.
The core question
How can we access the “Submitted by” value (the user who triggered the pipeline) at pipeline or notebook runtime?
Specifically:
Is there a supported API or pipeline variable that exposes this?
Is the Monitor UI using an internal control-plane API that is not yet publicly exposed?
Is passing the submitter explicitly as a pipeline parameter the only supported approach?
This information is important for auditing and operational logging, and currently the Monitor UI has it, but user code cannot access it.
Any official guidance or roadmap insight would be greatly appreciated.
Thanks in advance.
13 Replies
- deborshi_nagSuper User
Hello Yazdan
As a workaround you can enable Workspace monitoring on the workspace and query the KQL database.
In the workspace > Settings > Monitoring > turn on Log workspace activity (Fabric creates the monitoring Eventhouse + KQL DB).In the KQL DB, run a query likeItemJobEventLogs | where ItemKind == "Pipeline" | project Timestamp, WorkspaceName, ItemName, JobStatus, ExecutingPrincipalType, ExecutingPrincipalId, DurationMs | order by Timestamp desc- YazdanAdvocate II
Hi Deborshi,
Thanks for the reply. However, in the result of this query I can’t see the user who triggered the pipeline. I need that information to be available in the pipeline environment at runtime.
- deborshi_nagSuper User
Hi Yazdan Unfortunately, you won't be able to capture the Submitted By of a pipeline at runtime.
- deborshi_nagSuper User
Hello Yazdan
Unfortunately the Fabric Job Scheduler REST APIs don’t currently return “Submitted By” (the user who started the run) for DataPipeline job instances. The payloads you’re already using—List Item Job Instances and Get Item Job Instance—include fields like status, invokeType (Manual / Schedule / API), time stamps, and failureReason, but no user identity.
This has also been answered in the Community forum in the past.
Solved: Is it possible to get username of the user who tri... - Microsoft Fabric Community
- tayloramySuper User
Hi Yazdan,
deborshi_nag is correct, this info isn't available in the APIs, but the suggestion to try workspace monitoring is a great one.
I've seen some threads on the forum about workspace monitoring not properly logging pipeline runs, but it is worth a try if it works.Workspace monitoring overview - Microsoft Fabric | Microsoft Learn
- YazdanAdvocate II
Hi Tayloramy,
Thanks for the reply,
How can we access the pipeline activity logs in the pipeline environment at runtime?
Do you have any sample code for this?
Thanks,
- tayloramySuper User
Hi Yazdan,
If you're getting the use GUID, then I would recommend using the Graph APIs to get user details from the GUID:
https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http- v-dineshyaCommunity Support
- YazdanAdvocate II
Hi v-dineshya ,
Thanks for reaching out. I’m not fully sure about the solution yet and was just testing at this stage. If it turns out to be the right approach, I’ll definitely share and mark it here as the solution.
Appreciate your follow-up.
Regards,
Yazdan