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 …