List Flows as Admin action using Flow management in Power Automate
You can use Flow Management connector to get the history of all flows from an environment for analysis and troubleshooting purposes.
Follow below steps to use this connector and specific actions.
STEP 1 – Create Instant/ Automated Flow
Create an instant flow as trigger manual button click.
Step 2 – Add a Connector called as Flow management
Search Flow Management and select connector Power Automate Management.
Select List Flows as Admin.
use first party login and use credentials.
Now you can choose environment.
Step 3 – Test the Flow and check the response
Check the output you can see the JSON response.
Copy the Output and format it is JSON Formatter to see how many flows it returns. It returns 5 flows.
The sample full response given below. You can Parse JSON to extract all information from the response.
{
"statusCode": 200,
"headers": {
"Strict-Transport-Security": "max-age=15724800; includeSubDomains,max-age=31536000; includeSubDomains",
"x-ms-islandgateway": "GA0000000",
"x-ms-request-id": "westus:177900f1-ff04-49a0-8384-e453927f47b0",
"x-ms-correlation-request-id": "177900f1-ff04-49a0-8384-e453927f47b0",
"x-ms-flow-mobile-ios-version": "1.3.0",
"x-ms-flow-routing-request-id": "WESTUS:20221102T104346Z:177900f1-ff04-49a0-8384-e453927f47b0",
"Server-Timing": "x-ms-igw-upstream-headers;dur=762.4,x-ms-igw-req-overhead;dur=0.1",
"X-Content-Type-Options": "nosniff",
"x-ms-service-request-id": "98c694dc-ad58-4b1c-8508-a989fc47b31a",
"x-ms-correlation-id": "70a0ace8-2d32-424f-9416-a826e0ce28d6",
"x-ms-activity-vector": "IN.0G.00",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "false",
"x-ms-apihub-obo": "false",
"Date": "Wed, 02 Nov 2022 10:43:46 GMT",
"Content-Length": "14855",
"Content-Type": "application/json; charset=utf-8"
},
"body": {
"value": [
{
"name": "0d4ec77d-a051-182e-511d-ac43dbff241a",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08/flows/0d4ec77d-a051-182e-511d-ac43dbff241a",
"type": "Microsoft.Flow/environments/flows",
"properties": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_logicflows",
"displayName": "checkcasestatus",
"state": "Started",
"sharingType": "CommonDataService",
"createdTime": "2022-10-19T10:28:07.6061857Z",
"lastModifiedTime": "2022-10-19T11:11:36.6862044Z",
"flowSuspensionReason": "None",
"environment": {
"name": "71bbc436-9791-e2f8-b328-8558074ace08",
"type": "Microsoft.Flow/environments",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08"
},
"definitionSummary": {
"triggers": [
{
"type": "Request",
"kind": "VirtualAgent",
"metadata": {
"operationMetadataId": "ba0b15ba-5504-4203-92c3-4f8e86071f12"
}
}
],
"actions": [
{
"type": "Response",
"kind": "VirtualAgent",
"metadata": {
"operationMetadataId": "f08cb733-9d72-4370-9dd4-c72f478e286a"
}
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "ListRecords",
"metadata": {
"operationMetadataId": "8f9df0c5-3667-4746-81ed-eacac699d301"
}
},
{
"type": "If",
"metadata": {
"operationMetadataId": "beceb392-f9b8-47ad-a32c-20217f7f017b"
}
},
{
"type": "InitializeVariable",
"metadata": {
"operationMetadataId": "38b9a149-a5bc-481e-bd87-4228eb2b62ab"
}
},
{
"type": "InitializeVariable",
"metadata": {
"operationMetadataId": "64291831-6cf4-4b9e-86fa-3d03e38f8a4c"
}
},
{
"type": "Foreach",
"metadata": {
"operationMetadataId": "f8ae7d70-20a6-4313-be65-ebf3a6f5afa7"
}
},
{
"type": "SetVariable",
"metadata": {
"operationMetadataId": "ff47ab9a-0f68-4427-b37c-eb5f9f8207e5"
}
},
{
"type": "Switch",
"metadata": {
"operationMetadataId": "30b7e303-4d9e-484c-a4c7-acbd29314c1e"
}
},
{
"type": "SetVariable",
"metadata": {
"operationMetadataId": "70a2ae87-cbf4-4235-9231-573296bbc74e"
}
},
{
"type": "SetVariable"
},
{
"type": "SetVariable"
}
],
"description": "Call this flow from Power Virtual Agents."
},
"creator": {
"tenantId": "ddac7a91-dec8-4933-882e-e2e889553a98",
"objectId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userType": "ActiveDirectory"
},
"provisioningMethod": "FromDefinition",
"flowFailureAlertSubscribed": true,
"workflowEntityId": "3aa8e1b3-984f-ed11-bba1-000d3a37754a",
"isManaged": false
}
},
{
"name": "301d8a30-8d92-a9b2-3768-e507c551bed6",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08/flows/301d8a30-8d92-a9b2-3768-e507c551bed6",
"type": "Microsoft.Flow/environments/flows",
"properties": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_logicflows",
"displayName": "ARC: rfggfg (do not delete or rename)",
"state": "Started",
"sharingType": "CommonDataService",
"createdTime": "2022-10-22T07:56:18.6357719Z",
"lastModifiedTime": "2022-10-22T07:56:19.0052499Z",
"flowSuspensionReason": "None",
"environment": {
"name": "71bbc436-9791-e2f8-b328-8558074ace08",
"type": "Microsoft.Flow/environments",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08"
},
"definitionSummary": {
"triggers": [
{
"type": "OpenApiConnectionWebhook",
"swaggerOperationId": "SubscribeWebhookTrigger"
}
],
"actions": [
{
"type": "InitializeVariable"
},
{
"type": "If"
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "CreateRecord"
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "PerformUnboundAction"
},
{
"type": "If"
},
{
"type": "Terminate"
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "GetItem"
},
{
"type": "SetVariable"
},
{
"type": "SetVariable"
}
]
},
"creator": {
"tenantId": "ddac7a91-dec8-4933-882e-e2e889553a98",
"objectId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userType": "ActiveDirectory"
},
"provisioningMethod": "FromDefinition",
"flowFailureAlertSubscribed": true,
"workflowEntityId": "c058c7e9-de51-ed11-bba1-000d3a37754a",
"isManaged": false
}
},
{
"name": "477eb3d5-8489-d74a-25d6-82450506262d",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08/flows/477eb3d5-8489-d74a-25d6-82450506262d",
"type": "Microsoft.Flow/environments/flows",
"properties": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_logicflows",
"displayName": "ARC | fdfdfsdf (do not delete or rename)",
"state": "Started",
"sharingType": "CommonDataService",
"createdTime": "2022-10-22T07:55:56.4007427Z",
"lastModifiedTime": "2022-10-22T07:56:12.527172Z",
"flowSuspensionReason": "None",
"environment": {
"name": "71bbc436-9791-e2f8-b328-8558074ace08",
"type": "Microsoft.Flow/environments",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08"
},
"definitionSummary": {
"triggers": [
{
"type": "OpenApiConnectionWebhook",
"swaggerOperationId": "SubscribeWebhookTrigger"
}
],
"actions": [
{
"type": "OpenApiConnection",
"swaggerOperationId": "PerformUnboundAction"
}
]
},
"creator": {
"tenantId": "ddac7a91-dec8-4933-882e-e2e889553a98",
"objectId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userType": "ActiveDirectory"
},
"provisioningMethod": "FromDefinition",
"flowFailureAlertSubscribed": true,
"workflowEntityId": "e4cac6ef-de51-ed11-bba1-000d3a37754a",
"isManaged": false
}
},
{
"name": "70738b85-2558-1e3f-ecd4-d438e9e7608d",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08/flows/70738b85-2558-1e3f-ecd4-d438e9e7608d",
"type": "Microsoft.Flow/environments/flows",
"properties": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_logicflows",
"displayName": "Create Case fromPVA",
"state": "Started",
"sharingType": "CommonDataService",
"createdTime": "2022-10-19T10:15:22.2658195Z",
"lastModifiedTime": "2022-10-19T11:02:41.0264048Z",
"flowSuspensionReason": "None",
"environment": {
"name": "71bbc436-9791-e2f8-b328-8558074ace08",
"type": "Microsoft.Flow/environments",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08"
},
"definitionSummary": {
"triggers": [
{
"type": "Request",
"kind": "VirtualAgent",
"metadata": {
"operationMetadataId": "b8e45bee-3268-49c9-8954-357c42251ac5"
}
}
],
"actions": [
{
"type": "Response",
"kind": "VirtualAgent",
"metadata": {
"operationMetadataId": "de55610d-8157-470c-af85-b0b874d07089"
}
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "ListRecords",
"metadata": {
"operationMetadataId": "0f4e0735-5bd8-43cf-8ab7-bce264f6ffad"
}
},
{
"type": "If",
"metadata": {
"operationMetadataId": "d82bca96-3e8d-4e33-bfd5-6c7880782516"
}
},
{
"type": "Foreach",
"metadata": {
"operationMetadataId": "be188197-b460-4265-89c6-b3916958b26b"
}
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "CreateRecord",
"metadata": {
"operationMetadataId": "ae459c46-e0d2-459c-9525-e8bdd02d8feb"
}
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "CreateRecord",
"metadata": {
"operationMetadataId": "9916a18a-4d27-4074-972e-fe0d0a628b51"
}
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "GetItem",
"metadata": {
"operationMetadataId": "18002868-b2ed-4f43-9cb5-e60720ea9199"
}
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "CreateRecord",
"metadata": {
"operationMetadataId": "e5c8f331-abb7-48c2-a78c-975388399b31"
}
}
],
"description": "Call this flow from Power Virtual Agents."
},
"creator": {
"tenantId": "ddac7a91-dec8-4933-882e-e2e889553a98",
"objectId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userType": "ActiveDirectory"
},
"provisioningMethod": "FromDefinition",
"flowFailureAlertSubscribed": true,
"workflowEntityId": "daaf86ea-964f-ed11-bba1-000d3a37754a",
"isManaged": false
}
},
{
"name": "ac4d805a-edbe-9617-8b91-ad862e149545",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08/flows/ac4d805a-edbe-9617-8b91-ad862e149545",
"type": "Microsoft.Flow/environments/flows",
"properties": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_logicflows",
"displayName": "Generate QR Code",
"state": "Stopped",
"sharingType": "CommonDataService",
"createdTime": "2022-10-10T10:41:29.2890142Z",
"lastModifiedTime": "2022-10-10T11:13:53.91105Z",
"flowSuspensionReason": "None",
"environment": {
"name": "71bbc436-9791-e2f8-b328-8558074ace08",
"type": "Microsoft.Flow/environments",
"id": "/providers/Microsoft.Flow/environments/71bbc436-9791-e2f8-b328-8558074ace08"
},
"definitionSummary": {
"triggers": [
{
"type": "OpenApiConnectionWebhook",
"swaggerOperationId": "SubscribeWebhookTrigger",
"metadata": {
"operationMetadataId": "49ffa101-8b32-4643-87ad-b0df2e8752f2"
}
}
],
"actions": [
{
"type": "OpenApiConnection",
"swaggerOperationId": "CreateBarcode",
"metadata": {
"operationMetadataId": "f03829f9-51c3-426c-9b8b-7082a3a897f2"
}
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "CreateQrCode",
"metadata": {
"operationMetadataId": "81fff9bb-ec55-4cde-a355-08596721055d"
}
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "UpdateEntityFileImageFieldContent",
"metadata": {
"operationMetadataId": "cfd3b1f4-adad-4018-90d5-e70d547928c2"
}
},
{
"type": "OpenApiConnection",
"swaggerOperationId": "UpdateEntityFileImageFieldContent",
"metadata": {
"operationMetadataId": "89b25f1e-e0f5-4008-8b5e-a18165104d03"
}
}
]
},
"creator": {
"tenantId": "ddac7a91-dec8-4933-882e-e2e889553a98",
"objectId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userId": "67a4a134-8591-46de-af67-884d6b7d32ff",
"userType": "ActiveDirectory"
},
"provisioningMethod": "FromDefinition",
"flowFailureAlertSubscribed": true,
"workflowEntityId": "69121a0f-8848-ed11-bba1-00224806aade",
"isManaged": false
}
}
],
"nextLink": "https://flow-apim-unitedstates-002-westus-01.azure-apim.net/apim/flowmanagement/shared-flowmanagemen-257a62ad-cad7-49d0-9466-824491af4dc4/scopes/admin/environments/71bbc436-9791-e2f8-b328-8558074ace08/flows?api-version=2016-11-01&include&%24expand&%24skiptoken=eyJzdWJzY3JpcHRpb25JZHMiOlsiZTExNDcwYzItY2Y3YS00NjliLTk4YzgtMmJmZDQzZThhZTViIiwiNzQyMjU3YjUtZjUzYy00NTMzLTgyZDQtODRhYjNjMjQwMDlkIiwiMzRlZWRmYmYtM2UzMy00NzVkLWI1MTAtMjM1MzdmYmEzZGM5IiwiNzFiNmViM2YtNDhhNC00NmI3LTlkZjQtOGVjMTE5ZmMyYTExIl0sImN1cnJlbnRTdWJzY3JpcHRpb25JbmRleCI6MX0%3d"
}
}
Hope it helps.
Follow my blog for more trending topics on Dynamics 365, Azure, C#, Power Portals and Power Platform. For training, Courses and consulting, call to us at +91 832 886 5778 I am working more for community to share skills in Dynamics 365 and Power Platform. Please support me by subscribing my YouTube Channel. My YouTube Channel link is this : https://www.youtube.com/user/sppmaestro