Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Debugging liquid fetchxml permission issues

I would like to use a liquid fetchxml expression to obtain entity information. Next to some answers in this forum these two articles  Dynamics 365 portals liquid templates part 3  and How to use fetchxml did provide very useful information. As a result I created the following liquid template 


{% if user %}
Hallo, {{ user.firstname }} !
{% else %}
{% endif %}

{% fetchxml my_query %}
<fetch version="1.0" mapping="logical">
  <entity name="contact">
    <attribute name="fullname" />
{% endfetchxml %}

{{ my_query.xml | xml_escape}}

Count: {{ my_query.results.total_record_count }}
{% for result in my_query.results.entities %}
Name: {{ result.fullname}}
{% endfor %}



Setting global entity permissions for contact, binding that entity permission to the webrole 'administrator' and logging in onto the portal as administrator I still get as count '0', while pasting the resulting fetchxml into a tool like XRM toolbox does return (of course) contacts. This leads me to the conclusion that there is still something wrong with authorization - but I cannot figure out what. I tried for example extensions to the fetchxml tag (enable_entity_permissions: true, right: 'read'), but no luck. Is there any way to get more insight into reasons for authorization failures? It likely is something trivial that I overlook. Any help appreciated!


What is the value displayed for the XML attribute?  That is the combination of the original FetchXML, and any extra FetchXML included for Entity Permissions.

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Users online (8,589)