I dont know any “direct” way to get that info with activites, or .net functionalities, but I can think of a solution using 3 api calls, that would actually work for you:
1- Auth to orchestrator
(Optional) 2- With the bearer token, get a list of folders within that Tenant
3- For each folder, find a list of jobs running (you’re trying to identify your own program name, and “State” = “In Progress” from that list)
When you get a match, you’ll know that you’ve found the correct job, and then by grabbing the
"OrganizationUnitFullyQualifiedName" value, you’ll get the folder.
The only step left will be to keep that Folder Name that you were scanning, and log it into a log message.
Edit: You’ll need to filter by “ReleaseName” that will contain the name of your process!