rest api,用于获取在 msdynamics 中共享记录的所有用户和团队的列表

问题描述 投票:0回答:1

我想查看共享记录的用户和团队的列表。我只想查看通过共享按钮(而不是通过安全角色)有权访问记录的用户和团队的列表。

我知道 RetrieveSharedPrincipalsAndAccessRequest 函数。但是,我不想编写插件或创建自定义操作。

我的问题是如何使用“RetrieveSharedPrincipalsAndAccessRequest”函数作为 REST API?

dynamics-crm dynamics-crm-2011 microsoft-dynamics
1个回答
0
投票

PrincipalAccessObject 表保存共享数据,您可以查询它。

例如通过使用 FetchXml:

<fetch>
  <entity name='principalobjectaccess'>
    <attribute name='objectid' />
    <attribute name='objecttypecode' />
    <attribute name='accessrightsmask' />
    <link-entity name='systemuser' to='principalid' from='systemuserid' alias='u' link-type='outer'>
      <attribute name='systemuserid' />
      <attribute name='fullname' alias='user' />
    </link-entity>
    <link-entity name='team' to='principalid' from='teamid' alias='t' link-type='outer'>
      <attribute name='teamid' />
      <attribute name='name' alias='team' />
    </link-entity>
    <filter>
      <condition attribute='objectid' operator='eq' value='{OBJECT-ID}' />
    </filter>
  </entity>
</fetch>

访问权限掩码是一个标志枚举。有关它的文档可以在 MS Learn 上找到。

© www.soinside.com 2019 - 2024. All rights reserved.