按 Dynamics 365 类型筛选用户

Filter users by type Dynamics 365

我正在尝试从 Dynamics 365 CRM 的视图中排除应用程序用户。获取xml很简单:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="systemuser">
    <attribute name="fullname" />
    <attribute name="businessunitid" />
    <attribute name="title" />
    <attribute name="address1_telephone1" />
    <attribute name="positionid" />
    <attribute name="systemuserid" />
    <order attribute="fullname" descending="false" />
    <filter type="and">
      <condition attribute="type" operator="ne" value="App User" />
    </filter>
  </entity>
</fetch>

我需要在我的查询中放置一个过滤器,就像这样的伪代码:<condition attribute="type" operator="ne" value="App User" />,类似于一个允许我按用户类型进行过滤的字段。是否有任何字段可以确定性地说用户是应用程序用户?

通常,Non-interactive 应用程序用户 将在系统用户实体中使用属性 Access mode = 4 创建。所以这应该有效。

<condition attribute="accessmode" operator="ne" value="4" />