I was recently shown this format and I think it's fantastic. I'm moving all my flows to this Action naming approach:
Format: <Original OOTB name of the Action> | <Verb on Noun>
Also, see my Flow tips here
I was recently shown this format and I think it's fantastic. I'm moving all my flows to this Action naming approach:
Format: <Original OOTB name of the Action> | <Verb on Noun>
Also, see my Flow tips here
Problem: When I call a child flow that uses a connection, the parent calling flow receives the error "Bad Request" with the following details "Action 'Run_Child_Flow' failed: Failed to parse invoker connections from trigger 'manual' outputs. Exception: Could not find property 'headers.X-MS-APIM-Tokens' in the trigger outputs. Workflow has connection references '["shared_wordonlinebusiness","shared_sharepointonline"]' with invoker runtime source.".
Error shows in the parent flow runs. |
Initial Hypothesis: Reading the message originally to me suggested that permissions are being lost between the parent and child flows. I did some Googleing/copiloting to see if anyone had seen the issue before and Darren Lutchner has a video that explains the issue and fixes it perfectly (https://www.youtube.com/watch?v=Yuh3Nlf9wrs).
Resolution: Watch Darren's video for a great walkthrough to understand the issue fully.
Resolution Summary:
1. Go to the "Child Flow", Edit the "Run only users"
2. I had two connections: Word Online (Business) & SharePoint, change them both from "Provided by run-only user" to "Use this connection (...)". Save and the parent flow starts working and calls the child flow correctly.Overview: The Power Automate Approval action on an existing flow stops working and throws the error: "'XrmApprovalsUserRoleNotFound'. Error Message: The 'Approvals User' role is missing from the linked XRM instance." I did not have control on the environment so I needed others to perform the fix so that I could verify.
Problem:
The ‘Start
and wait for an approval’ action/connector used in a Power Automate flow has
been failing for 3 weeks in Dev, I now need this functionality to change the
workflow ‘IDC-StartApprovalCertificateWorkflow’.
Initial
Hypothesis:
All the runs of my flow have been failing for 3 weeks in Dev for 3 weeks on the ‘Start and wait for an approval’ in the dev env. I have tried creating a new vanilla flow using the ‘Start and wait for an approval’ action and it fails with the same issue.
Triggering the flow in other environment including my production, and the ‘Start and wait for an approval’ action works. I cannot see any difference except the environments. The error message "XrmApprovalsUserRoleNotFound" is basically telling me that my user should be in the Approval Users role. I have the role assigned.
Resolution:
Microsoft
Support: Check the
user running the flow is int he 'Approvals User' role is correctly assigned in
the environment user security roles.
Admin: The user running the flow already
has the role assigned. We have re-assigned the role again. Did not test, got the developer/owner to
test.
Developer/me/flow owner: The approval has started
working again in the Dev environment, I just retested and flow that was not firing yesterday is now working again. New flows also fire/work correctly.
Summary: The user role in the Dataverse was correctly assigned, it looks like a refresh of the user in the 'Approver User' role corrected the issue.
Research:
https://www.linkedin.com/pulse/power-automate-approvals-flows-failing-adrian-colquhoun
Overview: I recently needed to generate a dynamic table within word using Power automate, there are lots of resources out there to do it. I found the order I did the core steps in determines if the process works so thought I'd blog this as a reminder and simple guide.
Objective: Use a flow to build an dynamic array and display the output within a Word document.
Steps:
1. Create a new Flow in Power Automate (here I am initialising an array but you can build this up as you need too. The Select option and nested actions allow for creating most required data sets)
2. Create a Word document for the template (in my scenario, I've created the MS word document inside a SharePoint Document library, as shown below)
3. Edit the word Document to Display the dynamic Rows (you need to edit in the Word app not the browser version of word).https://www.cloudsecuritea.com/2019/09/generate-an-overview-of-all-microsoft-flows-with-powershell/
![]() |
Use postman to Interact with an API - get the bearer token first. |
Overview: Licencing is extremely complicated, but there are threshold limits that are being reduced at the moment, August 2023.
O365 users get get the lowest priority profile, can only run the standard connectors, and have a "request" limit of 6,000 requests per day.
What is a Request?
Each flow consists of a combination of triggers, actions, and responses when cloud flow is run, the instance walks thru the actions such as Create a SharePoint list item, setting variables,
What counts as a Power Platform Request
"Here are some guidelines to estimate the request usage of a flow.
One or more actions run as part of a flow run. A simple flow with one trigger and one action results in two "actions" each time the flow runs, consuming 2 requests.
Power Automate Flows, by default, run in the context of the Flow Owner. The "actions" are worked out against the Flow Owner.
Every trigger/action in the flow generates Power Platform requests. All kinds of actions like connector actions, HTTP actions, built-in actions (from initializing variables, creating scopes to a simple compose action) generate Power Platform requests. For example, a flow that connects SharePoint, Exchange, Twitter, and Dataverse, all those actions are counted towards Power Platform request limits.
Both succeeded and failed actions count towards these limits. Skipped actions aren't counted towards these limits.
Each action generates one request. If the action is in an apply to each loop, it generates more Power Platform requests as the loop executes.
An action can have multiple expressions but it's counted as one API request.
Retries and additional requests from pagination count as action executions as well."
Here are my thoughts which seem to differ from the MS notes provide above: Not all Actions count as a request, If i look at the Power Automate Analytics it gives me a break down on the API calls to understand the "Request" counting. Basically any action that does an API call when run adds to the request count.
Guide for planning for limitations:
App Insights for Power Platform - Part 1 - Series Overview
App Insights for Power Platform - Part 2 - App Insights and Azure Log Analytics
App Insights for Power Platform - Part 3 - Canvas App Logging (Instrumentation key)
App Insights for Power Platform - Part 4 - Model App Logging
App Insights for Power Platform - Part 5 - Logging for APIM
App Insights for Power Platform - Part 6 - Power Automate Logging
App Insights for Power Platform - Part 7 - Monitoring Azure Dashboards
App Insights for Power Platform - Part 8 - Verify logging is going to the correct Log analytics
App Insights for Power Platform - Part 9 - Power Automate Licencing (this post)
App Insights for Power Platform - Part 10 - Custom Connector enable logging
App Insights for Power Platform - Part 11 - Custom Connector Behaviour from Canvas Apps Concern
Note: Announcement 23 Aug 2023 - integration of Power Automate telemetry data with Azure Application Insights.
Series
App Insights for Power Platform - Part 1 - Series Overview
App Insights for Power Platform - Part 2 - App Insights and Azure Log Analytics
App Insights for Power Platform - Part 3 - Canvas App Logging (Instrumentation key)
App Insights for Power Platform - Part 4 - Model App Logging
App Insights for Power Platform - Part 5 - Logging for APIM
App Insights for Power Platform - Part 6 - Power Automate Logging (this post)
App Insights for Power Platform - Part 7 - Monitoring Azure Dashboards
App Insights for Power Platform - Part 8 - Verify logging is going to the correct Log analytics
App Insights for Power Platform - Part 9 - Power Automate Licencing
App Insights for Power Platform - Part 10 - Custom Connector enable logging
App Insights for Power Platform - Part 11 - Custom Connector Behaviour from Canvas Apps Concern
#r "Newtonsoft.Json"using System.Net;using Microsoft.AspNetCore.Mvc;using Microsoft.Extensions.Primitives;using Newtonsoft.Json;public static async Task<IActionResult> Run(HttpRequest req, ILogger log){string requestBody = await new StreamReader(req.Body).ReadToEndAsync();dynamic data = JsonConvert.DeserializeObject(requestBody);int eventId = data?.eventId;string errType = data?.errType;string errMsg = data?.errMsg;string correlationId = data?.correlationId;string workflowId = data?.workflowId;string workflowUrl = data?.workflowUrl;string flowDisplayName = data?.flowDisplayName;var custProps = new Dictionary<string, object>(){{ "CorrelationId", correlationId},{ "WorkflowId", workflowId},{ "WorkflowUrl", workflowUrl},{ "WorkflowDisplayName", flowDisplayName}};using (log.BeginScope(custProps)){if (errType=="Debug"){log.Log(LogLevel.Debug, eventId, $"{errMsg}");}else if (errType=="Critical"){log.Log(LogLevel.Critical, eventId, $"{errMsg}");}else if (errType=="Warning"){log.Log(LogLevel.Warning, eventId, $"{errMsg}");}else if (errType=="Trace"){log.Log(LogLevel.Trace, eventId, $"{errMsg}");}else if (errType=="Error"){log.Log(LogLevel.Error, eventId, $"{errMsg}");}else{log.LogInformation($"Event is {eventId}, type is {errType}, and msg is {errMsg}");}};string responseMessage = $"This HTTP triggered function executed successfully. {errType} - {errMsg}";return new OkObjectResult(responseMessage);}
Power Platform Admin Centre:
There is nice analytics inside the Power platform Admin Centre as shown below to examine Flows/Power automate:
The flows can also be reviewed on a per environment basis:Series
App Insights for Power Platform - Part 1 - Series Overview
App Insights for Power Platform - Part 2 - App Insights and Azure Log Analytics
App Insights for Power Platform - Part 3 - Canvas App Logging (Instrumentation key)
App Insights for Power Platform - Part 4 - Model App Logging
App Insights for Power Platform - Part 5 - Logging for APIM
App Insights for Power Platform - Part 6 - Power Automate Logging (this post)
App Insights for Power Platform - Part 7 - Monitoring Azure Dashboards
App Insights for Power Platform - Part 8 - Verify logging is going to the correct Log analytics
App Insights for Power Platform - Part 9 - Power Automate Licencing
App Insights for Power Platform - Part 10 - Custom Connector enable logging
App Insights for Power Platform - Part 11 - Custom Connector Behaviour from Canvas Apps Concern
Overview: Most Canvas apps reach back to 3rd parties or internal storage e.g. SQL, Dataverse, blobs to persist data. In an ideal world we want to be able to identify error and performance concerns and be able to trace quickly.
Scenario: A canvas app performs a search against a custom connector, that goes to an external API, for example search's for Company Numbers from an Open API.
Tip: Always create App Insight Instances using a workspace and not the classic-mode app insights as it is being deprecated by Microsoft in early 2024.
App Insights Understanding:
App Insights setup using the Workspace-based setup (Log Analytics) can be queried in two ways:
The two options for logging Flows into App Insights. |
Overview: If I use a connection in a Canvas App, the signed in user uses their own permissions and the connector as as the signed in user.
Problem: I wish to run a flow as a specific user and not the users calling the flow from the Canvas app.
Hypothesis: I wish to call logging connector into Log Analytics, so I have created a flow, If I use the Power Apps V2 connector, it offers and option to run in another users context.
Resolution: Open the Workflow, ensure you are using the Power Apps V2 trigger, then...
Here I use the Scopes to perform a Try Catch finally set of logic
Reza Dorrani has a great recording showing running Power Automate flows using elevated/shared accounts.
Overview: Power Automate has good monitoring and analysis within the product, and Canvas apps use instrumentation to App Insights and allow for custom tracing. The issue is linking Canvas app logs to a called workflow. In this video (2min), I discuss linking Traces in Azure App Insights with flows run on Power Automate.
By passing the the workflow runs workflow back to the calling canvas app, a deep link will allow support to follow a users activity including drilling into the flows being called.
Add additional logging to Azure Log analytics to a custom table within your flows:
Update: 13 August 2023 - Power Apps Licencing has change considerably since this post, for example here is updated information on Power Automate licencing.
My Technical Working Notes for Microsoft Technology: App Insights for Power Platform - Part 9 - Power Automate Licencing (pbeck.co.uk) A major change in naming and cost has been release August 2023.
Overview: The Total Cost of Ownership (TCO) is key to any project. I recently was asked about a project that wanted to use Power Apps for external user access, the data is in the dataverse/CDS) and their are tons of workflows. The cost of buying a per app licence for external users is a non-started (without volume discount $5 or £3.80 per user per month and the only viable options left are:
Design by Cost:
Write the front end using free to distribute front end application (i.e. ReactJs, Angular, C#, Flutter, Blazor,...) and all the flows using the per-flow licencing model. Per-flow licencing is crazy expensive as it is per flow and my users have lots of flows when the login once a year. So per flow is also not an option with a custom front-end. At Ignite 2022, Microsft announce a new Power Automate Embedded SDK with pay as you go pricing, this may be a good option, but's its untested.
The $5/month/app plan doesn't really work as users login over the last few months of the year and all users would need to be licenced all year around so $60 is way too high. The Power Apps Pay-as-you-go Plan allows costs $10/£7.45 per user that logs in during a month. So in my case an average user logs in 2 times in a year with the monthly consideration, so i'm still looking at $20 per year.
User/Per App/month: £3.80
User/Month (multiple apps): £15.10
Active User/app/month Pas-as-you-go £7.45
Power Apps Portals/Power Pages/Dynamics Portals is my last hope. The licencing is based on per login per 24 hrs. So a user that logs in three times in a 24 hr period is considered 1 licence. If the user logs in on 4 different dates at any point in the year, the client is changed for 4 logins. Need to buy the licences in advance each month. Sold in blocks, the smallest being 100 logins in a month. At the lowest levels, cost is $2 per 24 hour login, but this reduces to a much lower cost relatively quickly. With our expected numbers, we'd get onto Tier 3, and the cost per login is $0.70 per login. If an average user logs in 4 times a year on separate dates, our cost is basically $2.80 per user per year.
Note there is also a Page Portals Capacity licence required. We are expecting an average of 175k page views, which cost a further $200.
13 Oct 2022: Licencing for Power Pages change yesterday, 1) monthly anonymous active users 2) monthly authenticate active users. Prepaid is cheaper than pay as you go, assuming you get you numbers right. https://www.microsoft.com/en-us/licensing/news/power_pages_general_availability#:~:text=Today we are announcing licensing and pricing details,to purchase through prepaid subscription and pay-as-you-go plans.
Summary: In this case, Power Pages is the best option.
Problem: As part of my OAuth process I need to swap and authorisation code for an Access Token using an API, the issue is that I need to get the token into PowerApps.
Initial Hypothesis: Initially I created an Azure Function that does the API post as it was the easiest. But I reverted and thought it must be easier for me to have fewer working parts and as my solution used Power Automate and I've previously used Power Automate with the HTTP custom connector I'd use the same approach. It proved fairly tricky to get the HTTP connector to work but with some playing around and clarification of my thinking it became rather straight forward.
Firstly, I need to ensure the API is working, so I use Postman:
![]() |
Postman POST request using form-urlencoded. |
Solution: From the raw HTTP trace, I realised I needed to post the body in Power Automate in the correct format. Key value pairs for parameters and separate with an Ampersand. Also, Url's need to be escaped/encodes, in C# there are functions to encode and decode. I needed to do the encoding using Find() and Replace() methods (sic). From Power Automate, I return the Access token, refresh token and other info back to Power Apps.
More Info:
Uri.UnescapeDataString(String) Method (System) | Microsoft Docs
Understanding HTML Form Encoding: URL Encoded and Multipart Forms - DEV Community
Overview: Move a word document into a pdf stream in a Power Automate flow.
Solution: I am triggering a flow when a word document is created in Dataverse. I get the word document in a stream and use OneDrive for Business (OD4B) to persist the docx to OneDrive. I use the Power Automate Word for Business connector to convert the docx in OD4B into a pdf binary stream in my flow.
![]() |
Img 1. Usage limits in Flows are counted against the flow owner. |
Query a Dataverse table in a Flow using OData |
Retrieving a row from the Dataverse custom "Subject" table. |
Add "Power Platform Tools" |