Get a Row By ID From Dataverse Using Power Automate

When working with Microsoft Dataverse in Power Automate, you often retrieve data as one of the most common tasks.

In Power Automate, there are two main ways to get data from Dataverse:

  • List rows: which gives you all the rows in a table (and then you filter what you need).
  • Get a row by ID: which fetches the exact row you want using its unique ID.

And each of these actions comes in two versions:

  • One that works in your default environment.
  • And another that lets you choose a specific environment ( when you’re working across multiple environments like dev, test, or production).

In this tutorial, I will explain how to get a row by ID from Dataverse using Power Automate with two examples. Such as:

  • Fetch a record directly from the “Get a row by ID” action using flow
  • How to use the “List rows from selected environment” action to get the same record

Get Dataverse Data by ID

For this tutorial, I’m using a Dataverse table named Support Tickets. This table stores customer support requests, and it has the following columns:

  • Ticket ID (Primary column)
  • Client Name
  • Email Address
  • Issue Description
  • Status
get a row by id power automate

In both examples below, we will try to get a single row (record) from this table based on a specific Ticket ID.

Get Row ID from Dataverse Table

Before I tell you how to get the data by ID, we first need to get the ID. To get the ID, follow the steps below:

Every record in Dataverse has a unique identifier called a GUID (short for Globally Unique Identifier). Power Automate needs this when you use the Get a row by ID action.

Here’s how you can find the GUID for any record:

  1. Go to Power Apps and open the Dataverse table you’re working with ( Support Tickets).
  2. On the Dataverse table page, click on the Edit button.
power automate get row by id
  1. Click on the record (row) you want to retrieve and click on Edit row using the form at the top of the page.
 how to get row id in dataverse using Power Automate
  1. Look at the URL in your browser. It will look something like this:
https://org7154f763.crm.dynamics.com/......&id=3a45e72e-f4c2-47bc-b258-f9f1c2fdfb62
  1. The part after id= is the GUID of the record:
3a45e72e-f4c2-47bc-b258-f9f1c2fdfb62

That’s the value you must paste into the Row ID field in Power Automate.

Get a Row By ID From Dataverse Using Power Automate

In this first example, we will retrieve a specific support ticket using its unique row ID. This is the easiest and most direct way to fetch a single row from Dataverse.

  1. Go to Power Automate and click Create from the left menu. Choose Instant cloud flow. Select Manually trigger a flow and click Create.
  2. In the search bar, type Get a row by ID (Dataverse) and select the one that says “Get a row by ID” (not the one with environment).
    • For Table name, select Support Tickets.
    • Enter a static GUID of a row ( 3a45e72e-f4c2-47bc-b258-f9f1c2fdfb62)
Get Dataverse Data Using Get a Row by ID Action using Power Automate
  1. Add a Compose Action to View Output. In the Inputs box, select the field you want to view.
Ticket ID: @{outputs('Get_a_row_by_ID')?['body/cr0e5_name']}
Client Name: @{outputs('Get_a_row_by_ID')?['body/cr0e5_clientname']}
Issue Description: @{outputs('Get_a_row_by_ID')?['body/cr0e5_issuedescription']}
how to get row id in dataverse in Power Automate
  1. Save the Flow. Click Test, choose Manually, and click Run flow. Once the flow runs successfully, it will fetch the support ticket using the given ID and show the selected field in the Compose action.
Power Automate Get Dataverse Data Using Get a Row by ID Action

As you can see, the above compose action outputs are given the TID002 in my dataverse table.

Get Dataverse Data Using Get a row by ID from the selected environment Action

Sometimes, you work in a non-default environment, like a Development or Production environment. In that case, the Get a row by ID action might not work unless you explicitly choose the environment.

Let’s use the Get a row by ID from selected environment action. Here, I will get the same row as in the above example.

  1. In Power Automate, click Create -> Instant cloud flow. Select Manually trigger a flow and click Create.
  2. Search for Get a row by ID (Dataverse) and select the one that says Get a row by ID from selected environment. Then provide the following parameters:
    • Choose your Environment name, in my case, it is the default environment, so I choose MSFT (default)
    • Select Support Tickets as the Table name.
    • Enter a static GUID of a row ( 3a45e72e-f4c2-47bc-b258-f9f1c2fdfb62)
how to get row id in dataverse
  1. Add a Compose Action to Display the Result. In the Inputs box, select the field you want to view.
Ticket ID: @{outputs('Get_a_row_by_ID_from_selected_environment')?['body/cr0e5_name']}
Client Name: @{outputs('Get_a_row_by_ID_from_selected_environment')?['body/cr0e5_clientname']}
Issue Description: @{outputs('Get_a_row_by_ID_from_selected_environment')?['body/cr0e5_issuedescription']}
Get Dataverse Data Using Get a row by ID from selected environment Action
  1. Click Save. Test the flow by clicking Test -> Manually -> Run Flow. You should now see the ticket data with the given ID.
Get a row by ID from Dataverse Power Automate

I hope both actions, Get a row by ID and Get a row by ID from selected environment, helped you retrieve specific data from Dataverse.

We also learned how to use Get a row by ID when working in your default environment, where you already have the record ID, and how to use Get a row by ID from the selected environment when you are in another environment.

If you do not need specific data but want a particular type of data, use List rows and List rows from the selected environment with a filter to get the data from the Dataverse table.

Furthermore, you may like some more Dataverse tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App