Perform a changeset request in Dataverse connector in Power Automate

You must’ve noticed Perform a changeset request in the Dataverse connector in Power Automate.

Purpose of this Action is to perform batch of available Dataverse connector actions successfully or rollback the batch performed inside this changeset request.

Here’s what it does.

Perform a changeset request

Here’s how to use the connector action

  1. Select Perform a changeset request in the Dataverse connector Actions list.

  2. Now, since this works like a batch of operations to perform all actions successfully or “rollback” operations, you’ll see this working like a Scope but only for Dataverse actions.

  3. You have the below Actions available to perform.

  4. Now, let’s design an example changeset batch here.
    First, I’ll create an Account and then a Contact.

  5. When this Flow runs, for example, if the Contact creation fails, the Account creation too will be rollbacked unlike having these steps outside of the “Perform a changeset request” action.



  6. Please note that the Outputs of the Changeset request itself or even within the steps within a changeset request cannot be captured or referred to in Dynamic Content.

Hope this helps!

Advertisement

Check which Power Automate or Power Apps Licenses are assigned to you | [Quick Tip]

In case you are using Power Automate for your own use or asked to build something for the team, here’s how you can check what capabilities you are entitled to –

Check Licenses in Power Automate

Here’s how you can check licenses assigned to you in Power Automate –

  1. When in Power Automate, click on the Gear icon.


  2. Now, select View My Licenses.

  3. Here, you’ll clearly see all the licenses and the capabilities you have with the Power Automate license assigned to you.


  4. Another example is a User with only Power Automate Free license assigned to them. This is what they will see –

  5. This simple and clear distinction helps you identify with the capabilities you have in Power Automate.
    Here’s the Power Automate Pricing Link provided in the “Learn how to add capabilities” section at the bottom.
    https://powerautomate.microsoft.com/en-us/pricing/

  6. Here’s a Bonus! Same applies for Power Apps as well. If you are in Power Apps (https://make.powerapps.com/) or in the App Designer in a Canvas App, you can see the Plan(s) option under the Gear Icon.


  7. And you’ll see the Capability available to your user.

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Create a GUID in a Flow | Power Automate [Quick Tip]

Here’s how you can create a GUID in a Flow!

GUID Function

Here’s how you can use the “guid()” method in Power Automate Flow to create a new GUID every time it’s run –

  1. I’m using an instant Flow to demonstrate this. And I have a variable where I’m adding a guid() method from the Dynamic Content area.


  2. Just using this, it’ll generate a unique GUID on each run.

  3. Below are some examples which were generated on each run.

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

See Trigger Outputs using Edit Columns in Flow Runs | Power Automate [Quick Tip]

If you are noticed a new addition to the Cloud Flows is where you see the Edit Columns in the Flow page.

Edit Columns in Flow

When you open a Flow, you see the below –

  1. These are your usual results of Flow Runs.

  2. And then you open each Flow Run to see what data is passed in the attributes of the steps.

  3. Now, here’s where Edit Columns are a useful new addition if you are using Flows around Sep 2022 time frame.

  4. And then you get to select the attributes from the Flow itself. In this instance, I’m select name and accountid fields from the Flow.
    Once your desired columns are selected, you can click Save.


  5. Those columns and their respective values will show up. This will save your effort to go into each Flow to look at what the values are.

  6. And from All Runs page, you can even export these to Excel if you need to.

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Authenticate Dataverse connector using Service Principal in a Power Automate Flow

Many times, users/admins are not comfortable using their credentials being used as Connections. Some connectors do provide the ability to authenticate using Service Principal.

Let’s jump into this! 😊

Setting Up App Registration for Dynamics 365 CRM

Here’s how you setup an App Service to be used as a Service Principal for Dataverse connector in Power Automate –

  1. Go to the Azure Portal (https://portal.azure.com/) and the look for Azure Active Directory.

  2. In Azure Active Directory, look for App Registrations in the menu.

  3. Now, create a + New registration record.

  4. Now, give this App Registration a suitable name. And you can select your preferences on how the tenant type should be. I’ve left it to Single tenant or simplicity of the example.

  5. Now, once this is created, go to the API Permissions section.

  6. Now, look for a button to Add a permission.

  7. Then, select Dynamics CRM and select it.

  8. Once this is selected, you’ll get to select user_impersonation. Then, clicked Add permissions.
  9. Once added, you’ll see that the Status column is blank. Then, click on Grant admin consent for <TenantName>.

  10. Once you click on Grant admin consent button, you’ll be asked for confirmation. Confirm the same.

  11. Once you confirm, you’ll see the status as Granted as shown below.

  12. Then, go to Certificates and secrets. Once in that, click on + New client secret.

  13. You’ll be asked the the Description, do so and Save it.

  14. Now, you need to copy the value onto Notepad.

  15. Now, let’s move to adding this App Registration to the Power Platform Admin Center so that you can then give appropriate permissions so that it can be used for Authentication into Dataverse.

Add Application User in Power Platform Admin Center

Go to the Power Platform Admin Center (https://admin.powerplatform.microsoft.com/) and the to the Environments section and select the correct Dataverse environment –

  1. Select the environment which will have your Flow that will use the Dataverse connection in question.
    And click Settings.

  2. Now, expand Users + permissions section and look for Application Users.

  3. Now, in Application Users, you’ll need to add the App Registration as a User and give Roles. Now, click on + New app user.

  4. Now, click on + Add an app.

  5. Now, any App Registration that has not yet been created in the current environment as user will automatically appear. Select the one you created – “Dataverse Service Principal” in this case and click on Add.

  6. Now, select the BU.

  7. Next, click on Security Roles’ pencil to give roles.

  8. I’m just giving System Administrator for simplicity of example.

  9. Now, you should be good to create this user. Click on Create.

  10. Finally, your Application Record will look like this –

  11. Now that your Application User is set in Dynamics / Power Platform Admin Center, you are all set to add this to authenticate the Dataverse Connector in Power Automate. Let’s do that!

Authenticating using Service Principle in Dataverse action

Now, let’s say you are starting a Flow with the Dataverse connector –

  1. Select the Dataverse trigger you want to use. I’ll pick a common one.

  2. Now, click on the three dots and look to add a new Connection if it already authenticated using the logged in user which is the default behavior.

  3. Now, you’ll see the option to select –

  4. Now, you’ll see these fields to fill in.

  5. Now, first give the connection itself a suitable name.

  6. Now, for Client ID – Go to the App Registration in Azure and look for the Client ID in the information section. It’ll look like this –


    Paste it in the Client ID field and it’ll look like this –

  7. Now, look for Client Secret – open the Notepad where you saved the Secret we copied while creating the Client Secret record in Azure.

  8. Now, finally – Go to the App Registration record and you’ll find the Tenant ID here –


    And paste is where it says Tenant. Now, Create this connection!
  9. Ensure that the Connection is selected.

  10. I’ll just add an extra variable in order to save this simple Flow and then we’ll create an Account (simple example if you see the screenshot below) in order to Run this Flow.
    My Flow looks ready to be tested.

  11. Now, I’ll create an Account in my Dynamics 365 CRM.

  12. And the Flow would have Run already.

Validate

In order to ensure the connection is run by the Service Principal itself, you can do this –

  1. In advanced options, you can choose to “Run as” as “Flow owner


  2. And when you check the details in the Flow Run, you can check the attribute in the trigger “RunAsSystemUserId

  3. And if you check this GUID, it belongs to the Dataverse Service Principal user we set up.


    And that’s how you can setup to run the Dataverse action to use Service Principal instead of user credentials!

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Dynamic content behavior for Get a row by ID and List Rows action in Dataverse connector | Power Automate Flow

Here’s an observation in one of the actions in the Dataverse connectors in Power Automate, which is “Get a row by ID”.

Select Columns

If you have selected specific columns in the Select Columns parameter of the connector, only those will be shown in the Dynamic content in next steps of the Flow.

All Columns

When you have not mentioned/selected specific columns and kept it blank, you’ll see the complete list of fields in the next steps of the Flow.

List Rows action

The same is also true for other action like “List Records” which shows all the attributes when selected columns are not mentioned, but shows only the ones mentioned with other required attributes if you have specific column names entered as shown below.

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Select the item based on a key value using Filter Array in Power Automate

In case you need to select an item from an array in Power Automate based on the value of a certain attribute, here’s how you can do it.

Scenario

In the below example, we want to select the item / array of objects where we want to select based on a value of an attribute. Here, the attribute is “key” and we want to select the condition to match the value “RelatedEntities

As you see, the array of objects have different structure – All of them have an attribute called “key” and that’s the one you want to select and then process further.

Let’s see how we do it.

Filter Array

Let’s see how you can select the item from the array based on the value of the “key” attribute instead of looping through all the items and matching.

  1. Now, let’s say the data is stored in the variable for demo purposes, that’s what I’m feeding into the Filter Array action in the Flow.
    Remember what goes into the Filter Array action has to be an array data.

  2. In Data Operations connector, you’ll find the Filter Array action which we’ll need to pick the item with “key” = “RelatedEntities”

  3. In Filter Array, you set the Input to the array data which is stored in the variable shown above.

  4. Once you select, you then need to provide the condition to filter the Array.
    In this example, we want to filter based on the “key” = “RelatedEntities” as seen in the Scenario section above.
    So, in the dynamic content section, go to Expression section and then use item() function and just like you access an element in a JS, you can mention what attribute you are trying to access.

  5. And in the value, you can mention what the value has to be.

  6. And in the answer, when you run the Flow with the sample data, you’ll get the below result.

  7. The other elements are filtered out. If you have two items of the same value, both will be returned.

  8. Below is how the actual code looks like when you edit in Advanced Mode –

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Select values from an array using Select action in a Power Automate Flow

In case want to pick a value from the attribute from an array or array of objects, here’s how you can do it.

Scenario

Let’s look at the below array of objects –

  1. Here’s sample data in a variable where there are 2 objects in an array.
    And we want to retrieve the value of the attributes called as “LogicalName


Select action in Data Operations

In order to fulfil this, let’s look at the Select action in Power Automate –

  1. In Data Operations, you’ll find Select operator

  2. When you choose Select, it’ll ask for the source of data, in this example – it’ll be the variable where we have Array of Objects.

  3. Now, you can choose what the resultant attribute should be called. You can enter custom name here.
    In this example, I want to call it “Name of Entity

  4. Now, in the Enter Value part, you must select the Logical Name attribute. So, you can use item() function to pick the value. Here’s how you use it –

  5. Once completed, your Select action will look something like this and you are ready to test.

  6. And when you run this test, here’s the result you’ll get –
    You’ll pick all the values in each of the “Name of the Entity” attribute in this array.

Array vs Object

  1. In case you have just a single Object and not an array, you still need to use an Array.
    Let’s say you choose Object type. The Flow will let you save.

  2. But, at runtime, it’ll throw the below error –
    “The ‘from’ property value in the ‘select’ action inputs is of type ‘Object’. The value must be an array.”


    So, the workaround is to store this in an Array itself and keep the type to Array.


Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Users cannot create Flows in Power Automate | Environment Maker permissions

If you are someone who has been asked to create Flows in Power Automate, and you go to Power Automate portal (https://make.powerautomate.com/) to make your first Flow in your environment, you may come across this if you are not an Administrator yet –

The error message would say -“You are not permitted to make flows in this ‘<EnvironmentName>’. Please switch to the default environment, or to one of your own environment(s), where you have maker permissions.

Now, let’s see what the issue is about.

Environment Maker Permissions

As a Power Platform Administrator yourself, you’ll need to provide Environment Maker privileges (Security Role) to the affected User in your environment –

  1. Navigate to the the Settings for the Environment in PPAC (https://admin.powerplatform.microsoft.com/)
    And look for Security Roles in Access area –

  2. Look for the Environment Maker role.

  3. When in Environment Maker role, look for the Add People button on the top.

  4. Now, search for the user who should have the Environment Maker permissions and click Add (which will be at the bottom of the pane).

  5. Now, you’ll see that this user is added.

  6. Now, when the User will refresh the Flow Editor, they’ll no longer see the error message and will be able to create/save Flows.

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Do Until action in Power Automate

Let’s look at what Do Until Action does in Control connector in Power Automate. In case you are a newbie or have used Power Automate till now to some extent, hopefully you find this post useful and easy to understand.

Explanation

Do Until will run iterations till the condition value is False. Once the value becomes True, it will break out of the loop.

Do Until

Here’s what the Do Until action will do –

  1. If you search for Control connector or the Do Until action itself, you’ll see this.

  2. Now, let’s see what the control parameters are and how we can use the condition to define how the Do Until will run.
    Explanation: We have a variable Text Input with value “A“.
    And, we want to run the Loop in Do Until till the value of Text Input becomes “A“.

    However, if the first iteration of the Do Until itself has Text Input = A, it will still run 1 iteration and then break out of the loop and not skip the loop right away.

  3. Now, in the body of the loop, I’m setting the value of the same variable “Text Input” = “B”.


    Here, the result will be the loop will outrun the maximum no. of iterations because the condition of Text Input = “A” was never true except for the first iteration as mentioned in #2 above.

    I’ll explain in the next section why it ran for 60 iterations.

  4. And, if we set the Text Input = “A” in the body of the loop, the first iteration will run and in the next iteration, it Text Input = “A” will be true and hence, break out of the loop and not execute any further.


    So as mentioned above, the 1st iteration will run and the next iteration will detect the true value and exit out of the loop since the loop was supposed to Run till the value of Text Input = “A


    Now, let’s look at why the iteration ran a certain number of times.

Change Limits

As you noticed by now, there’s a section called as Change Limits in the Do Until connector, let’s see what parameters can be set.

  1. Once you expand the Change limits section, you’ll see 2 parameters – Count and Timeout.

  2. Count will be the maximum count the iterations should run in case the value never becomes true.
  3. Timeout will take the time duration of how much time the loop should continue to run mentioned in https://en.wikipedia.org/wiki/ISO_8601 (ISO 8601 format).
  4. At least 1 property is mandatory for you to execute Do Until.

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Showing Sandbox or Non Production Apps in Power App mobile app
  2. Create a Power Apps Per User Plan Trial | Dataverse environment
  3. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  4. Co-presence in Power Automate | Multiple users working on a Flow
  5. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  6. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  7. Call a Flow from Canvas Power App and get back response | Power Platform\
  8. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  9. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  10. Asynchronous HTTP Response from a Flow | Power Automate
  11. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  12. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!