-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: extend 'flow run get' with approver information #1828
Comments
Thank you for reaching out to us. I wouldn't say this is a bug. There is a chance there is a difference between what information is exposed in CSV and what's available when calling the API. That said, we should have a look at what's in the API and if there is a way for us to get this information. |
Greatly appreciated your help. Thanks. |
According to this post https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-export-Approval-Flow-Data-through-Rest-API-in-power/td-p/593198 there is no way to achieve that with REST currently. I do not see a way to get the data in the However hacking a bit with Fiddler makes it look that we could call the endpoint |
Good find! The question is if we can get a token for that endpoint. If we can, then I'd be all for extending the command. Let's double check that before proceeding. |
@appieschot, @klubis did you had some time to have a double check on that endpoint and how we may use it? |
I have not; perhaps we can take this into account when we work on our #3670 epic? |
ok adding the |
Hi 👋 , When exporting a flow run as CSV, as explained in the 'Steps to reproduce', it exports every action of the flow run. Flow actions are not exported with the command When doing a get request to the following api, we can get the actions of a flow run GET https://management.azure.com/providers/Microsoft.ProcessSimple/environments/[EnvironmentName]/flows/[FlowName]/runs/[RunName]/actions?api-version=2016-11-01" every action that has the status 'Succeeded' has an Why both? Because the approval action information can be found in the body response of the |
HI @nicodecleyre , I have also checked this task. After analyzing the requests invoked in Power Automate, I noticed that it is possible to retrieve information about the run actions by adding |
@mkm17 this is an awesome find and IMO we could go with this approach. @pnp/cli-for-microsoft-365-maintainers |
Second to your idea @Adam-it: Let's just add a single extra flag that determines if we will retrieve additional action details. |
@Adam-it @martinlingstuyl |
All yours 👍 |
Could we shorten the flag's name to |
@waldekmastykarz Hi, in the current command, there is the flag |
Thanks for bringing it up @mkm17. I find it overly verbose and would suggest that we shorten |
…information. Closes pnp#1828
…information. Closes pnp#1828
…information. Closes pnp#1828
…information. Closes pnp#1828
…information. Closes pnp#1828
…information. Closes pnp#1828
Description
Power Automate portal allows to get all flow runs as JSON response that includes approver information along with other properties. However, m365 CLI Flow Run Get returns only subset of the flow historical data.
Steps to reproduce
Open Power Automate portal -> My Flows -> Choose Flow -> Click on All Runs -> Get .CSV file
Expected result
Actual result
Running m365 flow run get -e xxx -f yyy -n zzz -o json
Returns following JSON without any reference to flow approver, like user principal name, email, outcome and etc.
Is it possible to add these properties to the output of the function? Can we use options --query to expand return properties?
{
"name": "xxx",
"id": "/providers/Microsoft.ProcessSimple/environments/yyy",
"type": "Microsoft.ProcessSimple/environments/flows/runs",
"properties": {
"startTime": "2020-09-22T04:59:25.1666534Z",
"endTime": "2020-09-22T05:01:52.6243125Z",
"status": "Succeeded",
"correlation": {
"clientTrackingId": "xxxx"
},
"trigger": {
"name": "When_an_item_is_created",
"inputsLink": {
"uri": "xxx",
"contentVersion": "2O1Lig/PbQxBA3UIjmz/aA==",
"contentSize": 367,
"contentHash": {
"algorithm": "md5",
"value": "2O1Lig/PbQxBA3UIjmz/aA=="
}
},
"outputsLink": {
"uri": "yyy",
"contentVersion": "v0qWvwJ/Gc+VUhFTzNNX+g==",
"contentSize": 3182,
"contentHash": {
"algorithm": "md5",
"value": "v0qWvwJ/Gc+VUhFTzNNX+g=="
}
},
"startTime": "2020-09-22T04:59:24.92999Z",
"endTime": "2020-09-22T04:59:25.0706232Z",
"scheduledTime": "2020-09-22T04:59:24.830353Z",
"originHistoryName": "xxx",
"correlation": {
"clientTrackingId": "xxx"
},
"code": "OK",
"status": "Succeeded"
}
}
}
Environment
Latest CLI running on Windows 10 PRO in VS Code
The text was updated successfully, but these errors were encountered: