Microsoft graph:仅从组中获取用户 [英] Microsoft graph: get only users from group
问题描述
只是想知道是否有任何方法可以仅将用户放置在天蓝色广告组中.我尝试过这样的事情:
Just wondering if there's any way to get only the users placed inside an azure ad group. I've tried something like this:
var membros = await obtemUtilizadores
.Filter("'odata.type' eq '#microsoft.graph.user'")
.Select("id,userprincipalname,mail,displayname")
.Expand("extensions($filter=id eq 'assistenciasExtensions')")
.GetAsync().ConfigureAwait(false);
翻译成这个网址:
https://graph.microsoft.com/v1.0/groups/xxxxxx/members?
$filter='odatatype eq 'microsoft.graph.user'&
$select=id,userprincipalname,mail,displayname&
$expand=extensions($filter=id eq 'assistenciasExtensions')
返回一个错误,说明过滤器错误.
Which returns an error saying that the filter is wrong.
顺便说一句,我真正需要的是使用assistenciasExtensions 数据从X 组中获取所有用户.
Btw, what I really need is to get all users from within group X with the assistenciasExtensions data.
谢谢.
路易斯
推荐答案
不幸的是,目前无法为此提供服务端过滤器(过滤导航集合的目标 - 用于类型和/或任何属性,包括扩展属性).您需要获取所有成员,然后在客户端进行过滤.感谢这非常糟糕 - 我为此提交了一个用户语音项目 - 请随时为这个功能投票.https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/19587061-allow-filter-on-target-of-a-navigation-collection
Unfortunately a service-side filter for this is not currently possible (filtering on the target of a navigation collection - for type and/or any property including extension properties). You'll need to get all members and then filter on the client side. Appreciate that this is pretty awful - I filed a user voice item for this - please feel free to vote for this feature. https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/19587061-allow-filter-on-target-of-a-navigation-collection
希望这会有所帮助,
这篇关于Microsoft graph:仅从组中获取用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!