From 2b8a635041d222aa1f0c76b7fd254e77df53e50a Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Tue, 12 Mar 2024 21:55:47 +0100 Subject: [PATCH] Fix Get-PnPFlow timing out (#3820) Fix Get-PnPFlow timing out after 100 seconds. A missing "/" was causing sending a request to an invalid domain. Co-authored-by: Gautam Sheth --- src/Commands/PowerPlatform/PowerAutomate/GetFlow.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Commands/PowerPlatform/PowerAutomate/GetFlow.cs b/src/Commands/PowerPlatform/PowerAutomate/GetFlow.cs index 78b109d67..d6e664f20 100644 --- a/src/Commands/PowerPlatform/PowerAutomate/GetFlow.cs +++ b/src/Commands/PowerPlatform/PowerAutomate/GetFlow.cs @@ -58,7 +58,7 @@ protected override void ExecuteCmdlet() WriteVerbose($"Retrieving specific Power Automate Flow with the provided name '{flowName}' within the environment '{environmentName}'"); - var result = GraphHelper.GetAsync(Connection, baseUrl + $"providers/Microsoft.ProcessSimple{(AsAdmin ? "/scopes/admin" : "")}/environments/{environmentName}/flows/{flowName}?api-version=2016-11-01", AccessToken).GetAwaiter().GetResult(); + var result = GraphHelper.GetAsync(Connection, baseUrl + $"/providers/Microsoft.ProcessSimple{(AsAdmin ? "/scopes/admin" : "")}/environments/{environmentName}/flows/{flowName}?api-version=2016-11-01", AccessToken).GetAwaiter().GetResult(); WriteObject(result, false); } else @@ -81,7 +81,7 @@ protected override void ExecuteCmdlet() WriteVerbose($"Retrieving all Power Automate Flows within environment '{environmentName}'{(filter != null ? $" with filter '{filter}'" : "")}"); - var flows = GraphHelper.GetResultCollectionAsync(Connection, baseUrl + $"providers/Microsoft.ProcessSimple{(AsAdmin ? "/scopes/admin" : "")}/environments/{environmentName}/flows?api-version=2016-11-01{(filter != null ? $"&$filter={filter}" : "")}", AccessToken).GetAwaiter().GetResult(); + var flows = GraphHelper.GetResultCollectionAsync(Connection, baseUrl + $"/providers/Microsoft.ProcessSimple{(AsAdmin ? "/scopes/admin" : "")}/environments/{environmentName}/flows?api-version=2016-11-01{(filter != null ? $"&$filter={filter}" : "")}", AccessToken).GetAwaiter().GetResult(); WriteObject(flows, true); }