[Model-driven apps – Virtual Tables] How to resolve the AAD User’s lookup issue in MDA forms before Microsoft’s fix?

Microsoft has recently introduced a virtual table called AAD User. This table allows to retrieve any user in an organization’s Azure Active Directory. This feature is available on all environments, no action is required to use it.

One possibility is to create lookup columns of type AAD User. This will allow to create relationships between a Dataverse record and a user that is part of the organization’s AAD. This works very well, except for the search part in the lookup control.

Indeed, the control lookup does not filter the records according to the search applied by the user. After some investigations and discussions in the Power Apps community, it turned out that this is a bug. Microsoft is now aware of this problem and will soon make a fix to resolve this issue.

To solve this problem, I suggest using a PCF control instead of the standard control. This is a workaround while waiting for Microsoft to provide a fix. If you can’t develop your own PCF, I suggest using a control that I found on PCF Gallery. Indeed, the control is “React-Select Lookup PCF Component” made by “Matias Contreras”. You can download the managed solution and install it in your environment without any problem. Let’s look at what the control looks like and how it reacts to the user’s query.

Below is the configuration to make the control work properly:

The FetchXml used is the following:

  <entity name="aaduser">
    <filter type="and">
      <condition attribute="displayname" operator="like" value="%(filter)%" />

With this configuration, we were able to workaround the lookup issue for the AAD User virtual table. This is still a workaround and we hope that the next release will fix this bug. Hope it helps …


4 thoughts on “[Model-driven apps – Virtual Tables] How to resolve the AAD User’s lookup issue in MDA forms before Microsoft’s fix?

  1. I may have missed a configuration for this PCF control but as it stands, I am unable to get it to work due to an AccessToken error….


  2. Hi. This is cool for searching but if I enter a name and tab off or try to amend an existing record, I cannot remove or delete the value (set it as null/empty). All I can do is add someone from the search list. Thanks.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s