问题
I am having trouble accessing the management activity API that has recently been rolled out. Though I believe I have correctly configured my app
Yet when I make the following API call
POST
https://manage.office.com/api/v1.0/<tenantId>/activity/feed/subscriptions/start?contentType=Audit.SharePoint
BODY
{
"webhook" : {
"address": "<myServerURL>",
"authId": "o365activityapinotification",
"expiration": ""
}
}
RESPONSE
401
{
"Message": "Authorization has been denied for this request."
}
What am I doing wrong?
Update 1
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"
}
}
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?
回答1:
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.
来源:https://stackoverflow.com/questions/32583795/office365-unauthorized-response-when-accessing-the-management-activity-api