Office365:访问管理活动api时出现未经授权的响应 [英] Office365: Unauthorized response when accessing the management activity api

查看:183
本文介绍了Office365:访问管理活动api时出现未经授权的响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法访问最近推出的管理活动API.虽然我相信我已经正确配置了我的应用程序

I am having trouble accessing the management activity API that has recently been rolled out. Though I believe I have correctly configured my app

当我进行以下API调用时

Yet when I make the following API call

POST

https://manage.office.com/api/v1.0/<tenantId>/activity/feed/subscriptions/start?contentType=Audit.SharePoint    

身体

{
"webhook" : {
"address": "<myServerURL>",
"authId": "o365activityapinotification",
"expiration": ""
}

}

响应

401
{
    "Message": "Authorization has been denied for this request."
}

我在做什么错了?

我成功注册了Webhook(不知道问题出在哪里,但现在已经注册了我的Webhook)

I successfully registered the webhook (don't know what the issue was but it has registered my webhook now)

{
"contentType": "Audit.Sharepoint",
"status": "disabled",
"webhook": {
    "authId": "o365activityapinotification",
    "address": "<myserverurl>",
    "expiration": null,
    "status": "enabled"
}
}

是我得到的答复.现在,我的问题是为什么状态已禁用? 我做了很多更改,但没有收到Push消息,我相信这里是禁用状态.有帮助吗?

is the response I got. Now my question is why is the status disabled? I did bunch of changes but no Push has been received, I believe this disabled state here is the reason. Any help?

推荐答案

API处于预览状态,因此当您订阅时,API处于DISABLED状态,并且您必须要求MSFT伙计为您启用它(前提是您有邀请)到早期访问) 我的订阅现已启用,并且我收到有关租户级别更改的PUSH通知.

The API is in preview state so when you subscribe, it's in DISABLED state and you have to ask MSFT guys to enable it for you (provided you had an invite to the early access) My subscription is enabled now and I'm getting the PUSH notifications for the tenant level changes.

这篇关于Office365:访问管理活动api时出现未经授权的响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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