[英]Microsoft graph API: Query to get list of subscriptions already created on mailbox for a specific user using userID
Is there any way to get list of subscriptions specific to a users mailbox like we have one for user's one-drive similar to the code below.有什么方法可以获取特定于用户邮箱的订阅列表,就像我们有一个用于用户的单驱动器的订阅列表,类似于下面的代码。
The is one end point available to fetch out all the subscriptions as https://graph.microsoft.com/v1.0/subscriptions but I want to get only mailbox specific subscriptions.这是一个可用于提取所有订阅的端点,如https://graph.microsoft.com/v1.0/subscriptions但我只想获取特定于邮箱的订阅。
IDriveItemSubscriptionsCollectionPage subscriptions = await graphClient.Users[{UserId}]
.Drive
.Root
.Subscriptions
.Request()
.GetAsync();
'''
Thank you for reaching out.感谢您伸出援手。 To my knowledge, there isn't currently a way to do this with MS Graph, since listing the subscriptions doesn't support the OData query params.
据我所知,目前没有办法使用 MS Graph 执行此操作,因为列出订阅不支持 OData 查询参数。 As a workaround, I would suggest fetching the list then filtering by the
resource
param client side once the response is sent by graph:作为一种解决方法,我建议获取列表,然后在通过图形发送响应后通过
resource
参数客户端进行过滤:
/users/{UserId}/messages
/用户/{UserId}/消息
Would you consider filing a feature request on the M365 developer platform so this can be looked into?您会考虑在 M365 开发者平台上提交功能请求以便对此进行调查吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.