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

Mehdi El AmriDyn365CE2 years ago20 Views

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:

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

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 …

Original Post https://xrmtricks.com/2022/06/23/model-driven-apps-virtual-tables-how-to-resolve-the-aad-users-lookup-issue-in-mda-forms-before-microsofts-fix/

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
March 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31       
« Feb   Apr »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...