Microsoft graph api MS Graph API,如何使用单个;获得;API方法调用以从联系人获取具有不同PropertyId的多个扩展属性?

Microsoft graph api MS Graph API,如何使用单个;获得;API方法调用以从联系人获取具有不同PropertyId的多个扩展属性?,microsoft-graph-api,Microsoft Graph Api,在测试MS Graph的联系人时,我尝试使用两个API调用获取业务传真和公司主电话号码: 商务传真: https://graph.microsoft.com/v1.0/users/{userId}/contacts?expand=singleValueExtendedProperties($filter=PropertyId eq 'String 0x3A24') https://graph.microsoft.com/v1.0/users/{userId}/contacts?expand=s

在测试MS Graph的联系人时,我尝试使用两个API调用获取业务传真和公司主电话号码:

商务传真:

https://graph.microsoft.com/v1.0/users/{userId}/contacts?expand=singleValueExtendedProperties($filter=PropertyId eq 'String 0x3A24')
https://graph.microsoft.com/v1.0/users/{userId}/contacts?expand=singleValueExtendedProperties($filter=PropertyId eq 'String 0x3A57')
公司主要电话号码:

https://graph.microsoft.com/v1.0/users/{userId}/contacts?expand=singleValueExtendedProperties($filter=PropertyId eq 'String 0x3A24')
https://graph.microsoft.com/v1.0/users/{userId}/contacts?expand=singleValueExtendedProperties($filter=PropertyId eq 'String 0x3A57')
有没有办法让这两个人同时打电话?我希望在office 365联系人视图中显示所有扩展属性。大概是这样的:

https://graph.microsoft.com/v1.0/users/{userId}/contacts?expand=singleValueExtendedProperties($filter=PropertyId eq 'String 0x3A24') and singleValueExtendedProperties($filter=PropertyId eq 'String 0x3A57')

您可以使用in运算符而不是eq运算符来获取id与您提供的列表匹配的所有属性

https://graph.microsoft.com/v1.0/users/{userId}/contacts?expand=singleValueExtendedProperties($filter=PropertyId in ('String 0x3A57','String 0x3A24'))

你应该能够将你的扩展属性分组在过滤器中,并使用一个或例如下面的工作为我

https://graph.microsoft.com/v1.0/me/contacts?expand=singleValueExtendedProperties($filter=(PropertyId eq 'String 0x3A24') or (PropertyId eq 'String 0x3A57'))
使用id的beta示例

https://graph.microsoft.com/beta/me/contacts?expand=singleValueExtendedProperties(filter=(id eq 'String 0x3A24') or (id eq 'String 0x3A57'))

谢谢你。我收到了错误消息“解析选择和扩展失败”。有什么想法吗?嗯,很明显,in操作符可能无法使用此特定的API片段。我收到了相同的错误“解析选择和扩展失败”。但我没有使用“我”。我的代码具有应用程序访问权限。Glen Scales。我犯了一个错误。您的示例不适用于beta版,但适用于v1.0!!非常感谢。Beta似乎不喜欢您使用PropertyId vs id,我已经包含了一个示例,在Beta中使用id代替PropertyId应该可以正常工作。Beta确实删除了错误,但它没有将这两个项作为扩展属性包含在返回值中或我可以看到的任何其他地方。谢谢你的更新。我可以在beta版中看到这些道具,在beta版中还有一些奇怪的事情发生,我得到了自动完成或建议的联系人条目返回。如果您只是针对一个特定的联系人尝试,您知道这些属性在使用该联系人id时存在,那么它是否有效?例如eq‘字符串0x3A24’)或(id eq‘字符串0x3A57’)