MS Graph组API:RESPEST_RESOURCENOTFOUND仅在ID上过滤时
当我将此查询发送到图形时:
https://graph.microsoft.com/v1.0/groups?$filter=id eq '8bd1ac2d-7cbf-4316-8f5d-0819179f4cff'
并且该组存在,我将获得一个带有1组的数组。
但是与不存在的ID相同的查询,我会收到此错误:request_resourcenotfound 我怎么没有空数阵列? 我应该如何测试该组是否存在而不会遇到错误?我在电力自动化工作。 谢谢,
When I send this query to Graph:
https://graph.microsoft.com/v1.0/groups?$filter=id eq '8bd1ac2d-7cbf-4316-8f5d-0819179f4cff'
And the group exists, I get an array with 1 group.
But the same query with an id that does not exist, I get this error : Request_ResourceNotFound
How come I don't get an empty array ?
How should I test if the group exists without getting an error ? I work in Power Automates.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果不存在组ID,则无法获得图API的结果。
它始终返回 request_resourcenotfound。”资源'xxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxx'不存在或存在其查询的参考 - 普罗伯特对象之一,而不是存在
。 图API获取组列表。
然后比较列表中的组ID。
There is no way to get the empty array as the result of graph API if the group id is not exist.
Its always return the Request_ResourceNotFound."Resource 'xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' does not exist or one of its queried reference-property objects are not present.",
For workaround you can use the List groups graph API to get the list of groups.
And then compare the group id in the list.