https://prefect.io logo
Title
t

Trevor Kramer

01/05/2023, 7:09 PM
Prefect 2.0. Is there a way to get the email address of whomever started the run? I tried using FlowRunContext.get().flow_run.created_by.display_value which looks like an email address but is missing the @ and periods.
1
m

Mason Menges

01/05/2023, 11:00 PM
The flow run context is just going to return the username for the user that kicked off the flow, you should be able to compare that against what's in the UI to determine the specific users email.
t

Trevor Kramer

01/17/2023, 2:15 PM
@Mason Menges I don't see how to get the email programatically. I can get the handle. Is there an api call to go from handle to email?