Skip to content

Enhancement: extend 'flow run get' with approver information #1828

@klubis

Description

@klubis

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

"body": {
    "responses": [
        {
            "responder": {
                "id": "2acd63ea-863e-4281-9bb7-edc6fca7b0a3",
                "displayName": "s",
                "email": "",
                "tenantId": "67e88f39-f855-4d41-xxxx-xxxxx",
                "userPrincipalName": "xxx"
            },
            "requestDate": "2020-09-21T08:27:10Z",
            "responseDate": "2020-09-21T08:27:51Z",
            "approverResponse": "Approve"
        }
    ],
    "responseSummary": "Approver: xxx, xxx\r\nResponse: Approve\r\nRequest Date: Monday, September 21, 2020 8:27:10 AM\r\nResponse Date: Monday, September 21, 2020 8:27:51 AM",
    "completionDate": "2020-09-21T08:27:52Z",
    "outcome": "Approve",
    "name": "16f35689-d90f-4a50-xxxx-ac89fa5a7ecb",
    "title": "New Item Approval",
    "requestDate": "2020-09-21T08:27:09Z"
}

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions