Introduction

In this blog post, we will explore the process of retrieving user information from Dataverse using the capabilities of Power Automate. Our primary objective will be to extract valuable data related to both System Users and Active Directory (AD) Users.

System Users vs. AD Users

Before diving into the technical details, it's essential to understand the distinction between System Users and AD Users within Dataverse.

Prerequisites

To follow this guide, you will need.

Create dataverse table

Move to the PowerApps > Click on Tables > Click on Create a new table.

Create an AD user column

To achieve this, establish a lookup column and choose a table named "AAD User".

New Column

Create system user column

To achieve this, establish a lookup column and choose a table named "User".

Save column info

Create power automate

Move to the Power Automate > Click on Create a Flow> Select Automated flow.

Enter a flow name and select a trigger When a row is added, modified, or deleted (Microsoft Dataverse) as below.

Cloud Flow

Click on Create, and it will look like this,

Create

Get system user

Utilize the "Retrieve a Row by ID" action as follows.

In this context, you should access the "Users" table and specify the system user by selecting their ID as follows.

Created

Following the execution of this action, you can employ user properties either within a compose function or by storing them in a variable, as illustrated below.

Compose System user

Output

Get AD user

Get user (Select AD user)

Following the execution of this action, you can employ user properties either within a compose function or by storing them in a variable, as illustrated below:

Compose user mail

Output

Get User

Summary

Getting information about Dataverse users, whether they are regular users or users from your organization's Active Directory, using Power Automate, can make it much easier to handle data and automate tasks in your company.

I hope this helps.

Sharing is caring!