如何在Outlook中找到所有具有Prolaw原子的触点
我正在使用以下API获取停止服务后从APP数据库中删除的联系人。
graphClient.User[emailId]
.Contacts
.Request()
.Filter($"singleValueExtendedProperties/Any(ep: ep/id eq '{GlobalConstants.PrimaryKeyMapiId}')")
.Expand($"singleValueExtendedProperties($filter=id eq '{GlobalConstants.PrimaryKeyMapiId}')" )
.GetAsync()
.Result;
它的抛出例外,请提高解决方案的解决方案
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据我的搜索,当我们要在
singlevalueexteddendedproperties
上添加过滤器时,我们可以关注此文档。然后按我的测试进行,如果我发送了一个请求,例如
https://graph.microsoft.com/v1.0/users/user_id/contacts?use-filter=singlevalueextendedProperties/any(EP :ep/id eq'string {66f5a359-4659-4659-4830-9070-0004040ec6e} name fun'
) “ rel =“ nofollow noreferrer”>
因此我们必须像这样称呼API:<< code>https://graph.microsoft.com/v1.0/users/user_id/contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'String {66f5a359-4659-4830-9070-00040ec6ac6e} Name Fun '和ep/value eq'food')
Per my searching, when we want to add a filter on
singleValueExtendedProperties
, then we can follow this document.Then per my test, if I sent a request like
https://graph.microsoft.com/v1.0/users/user_id/contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'String {66f5a359-4659-4830-9070-00040ec6ac6e} Name Fun')
it will had issue like belowSo we have to call api like this:
https://graph.microsoft.com/v1.0/users/user_id/contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'String {66f5a359-4659-4830-9070-00040ec6ac6e} Name Fun' and ep/value eq 'Food')
如例外所述,
您需要添加
value
限制到过滤。或者,您可以尝试省略
.filter()
方法,因为过滤器本身是在.expand()
方法中指定的As mentioned in the exception
You need to add
value
restriction to filter.Or you can try to omit
.Filter()
method because the filter itself is specified in.Expand()
method