当存在$ select时,Microsoft Graph Group查询不会展开关系 [英] Microsoft Graph Group query does not expand relationships when $select is present

查看:68
本文介绍了当存在$ select时,Microsoft Graph Group查询不会展开关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试查询组所有者以及组的一些属性.当我添加$select时,owners属性将被删除.我需要$select来减少返回的数据量.有办法实现两者吗?

I am trying to query group owners along with a few properties of the groups. When I add $select the owners property gets dropped. I need $select to reduce the amount of data returned. Any way to achieve both?

/beta/groups?$expand=owners&$filter=startswith(mailNickname, 'rtan')&$top=999&$select=mailEnabled,owners

响应(具有mailEnabled,但缺少owners):

Response (has mailEnabled but is missing owners):

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#groups(mailEnabled,owners)",
  "value": [
    {
      "mailEnabled": true
    },
    {
      "mailEnabled": true
    },
    {
      "mailEnabled": true
    }
  ]
}

推荐答案

目前,为/groups端点组合$select$expand的一个解决方法是指定星号( *)$select表达式中的字符.

One workaround at the moment to combine both $select and $expand for /groups endpoint would be to specify asterisk (*) character in $select expression.

例如,以下查询:

https://graph.microsoft.com/beta/groups?expand=owners&select=owners,*

将返回 all 组详细信息以及owners

will return all the group details along with owners

这篇关于当存在$ select时,Microsoft Graph Group查询不会展开关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆