Microsoft Graph API Webhooks的仅应用程序令牌已可用吗? [英] Are app-only tokens already available for Microsoft Graph API webhooks?

查看:76
本文介绍了Microsoft Graph API Webhooks的仅应用程序令牌已可用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Webhook检索有关租户上用户的OneDrive的信息,使用仅应用程序的令牌和Microsoft Graph API.

I'm trying to retrieve information via a webhook, regarding User's OneDrives on a Tenant, using an app-only token, and the Microsoft Graph API.

我遇到的问题是 Microsoft Graph Explorer 保持在创建新的订阅时,在 500 响应中返回给我一个未定义的错误,该错误给我很少的信息:

The problem I'm having is that the Microsoft Graph Explorer keeps returning me an undefined error in an 500 response, that gives me little information, when creating a new subscription:

{
    "error": {
        "code": "",
        "message": "An error has occurred.",
        "innerError": {
            "request-id": "16546770-c3b0-4d9f-8a9c-1a79fb17ffcd",
            "date": "2016-09-06T10:15:04"
        }
    }
}

这是我通过POST发送给 https://graph.microsoft的信息.com/beta/subscriptions :

This is the information I'm sending via POST to https://graph.microsoft.com/beta/subscriptions:

{
  "changeType":"updated",
  "notificationURL":"https://{URL to notification page}",
  "resource":"/drives/{User's OneDrive drive ID}/root",
  "expirationDateTime":"2016-10-20T11:00:00"
}

以前回答的问题中,关于订阅的参考( Yina 的回答),该订阅是基于每个用户的,无法由应用创建令牌.

In previously answered questions, there was a reference (answer by Yina) about subscriptions being on a per user basis, and not being able to be created by an app-only token.

我的问题是,如果当前仍然如此,并且如果使用具有完全访问权限的仅应用程序令牌,我可以订阅用户的OneDrive Webhooks.

My questions are, if this is currently still true, and if using an app-only token with full access I can subscribe to User's OneDrive webhooks.

PS:我正在使用此令牌检索用户的OneDrive,没有问题,只是无法预订驱动器根项中的更改.

PS: I am retrieving User's OneDrives with this token, without an issue, just haven't been able to subscribe to changes in the root item of the drive.

推荐答案

当前,Microsoft Graph的WebHooks仍然仅支持委托令牌.

At present, the WebHooks of Microsoft Graph is still only support for the delegate token.

这意味着我们无法使用仅应用令牌来创建订阅.如果您希望Microsoft Graph支持此功能,则可以从链接此处提交反馈.

It means that we are not able to create the subscription using the app-only token. If you want the Microsoft Graph support this feature, you may submit the feedback from link here.

这篇关于Microsoft Graph API Webhooks的仅应用程序令牌已可用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆