OfficeDev / O365-InvestigationTooling

MIT License
574 stars 361 forks source link

unable to set webhook via PS #2

Open RiddhiKarani opened 8 years ago

RiddhiKarani commented 8 years ago

i updated the powershell script to include webhook but the response output i get shows null for webhook.

$headerParams = @{'Authorization'="$($oauth.token_type) $($oauth.access_token)"}

$webhook=@" { "webhook" : { "address": "https://o365managementapiwebhook.azurewebsites.net/", "authId": "o365activityapinotification", "expiration": "" } } "@

$jsonbody = $webhook | ConvertTo-Json

Invoke-RestMethod -Method Post -Headers $headerParams -Uri "https://manage.office.com/api/v1.0/$tenantGUID/activity/feed/subscriptions/start?contentType=Audit.SharePoint" -Body $jsonbody

this is the output i get contentType status webhook

Audit.SharePoint enabled

am i missing something?

PsychoData commented 5 years ago

@RiddhiKarani you don't even mention which script this is related to, I know this was ages ago, but you gotta provide more info if you want any help