Microsoft图形:仅从组中获取用户 [英] 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.
顺便说一句,我真正需要的是使用aidenciasExtensions数据从X组中获取所有用户.
Btw, what I really need is to get all users from within group X with the assistenciasExtensions data.
谢谢.
路易斯
推荐答案
不幸的是,目前尚无法对此进行服务侧过滤(在导航集合的目标上进行过滤-用于类型和/或任何属性,包括扩展属性) .您需要获取所有成员,然后在客户端进行过滤.赞赏的是,这非常糟糕-我为此提交了一个用户语音项目-请随时为该功能投票.
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图形:仅从组中获取用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!