Creating a Microsoft Graph webhook subscription to security/alerts fails
When I attempt to create a Microsoft Graph webhook subscription to the security/alerts endpoint, the subscription creation fails with a generic message as shown below. Modifying the resource to 'me/messages' results in a successful webhook subscription created, so this appears to be specific to the security/alerts endpoint. How do I move past this?
The body of the request is as such:
"changeType": "created",
"notificationUrl": "https://xxxxxxxxx.azurewebsites.net/api/graphnotifications",
"resource": "security/alerts?$filter=vendorInformation/provider+eq+'ASC'",
"expirationDateTime": "2018-11-15T11:00:00.0000000Z",
"clientState": "secretClientValue"
microsoft-graph microsoft-graph-security
add a comment |
When I attempt to create a Microsoft Graph webhook subscription to the security/alerts endpoint, the subscription creation fails with a generic message as shown below. Modifying the resource to 'me/messages' results in a successful webhook subscription created, so this appears to be specific to the security/alerts endpoint. How do I move past this?
The body of the request is as such:
"changeType": "created",
"notificationUrl": "https://xxxxxxxxx.azurewebsites.net/api/graphnotifications",
"resource": "security/alerts?$filter=vendorInformation/provider+eq+'ASC'",
"expirationDateTime": "2018-11-15T11:00:00.0000000Z",
"clientState": "secretClientValue"
microsoft-graph microsoft-graph-security
Wes, can you share the actual request url you are using here too? just to be double sure.
– Jeremy Thake MSFT
Nov 15 '18 at 16:40
add a comment |
When I attempt to create a Microsoft Graph webhook subscription to the security/alerts endpoint, the subscription creation fails with a generic message as shown below. Modifying the resource to 'me/messages' results in a successful webhook subscription created, so this appears to be specific to the security/alerts endpoint. How do I move past this?
The body of the request is as such:
"changeType": "created",
"notificationUrl": "https://xxxxxxxxx.azurewebsites.net/api/graphnotifications",
"resource": "security/alerts?$filter=vendorInformation/provider+eq+'ASC'",
"expirationDateTime": "2018-11-15T11:00:00.0000000Z",
"clientState": "secretClientValue"
microsoft-graph microsoft-graph-security
When I attempt to create a Microsoft Graph webhook subscription to the security/alerts endpoint, the subscription creation fails with a generic message as shown below. Modifying the resource to 'me/messages' results in a successful webhook subscription created, so this appears to be specific to the security/alerts endpoint. How do I move past this?
The body of the request is as such:
"changeType": "created",
"notificationUrl": "https://xxxxxxxxx.azurewebsites.net/api/graphnotifications",
"resource": "security/alerts?$filter=vendorInformation/provider+eq+'ASC'",
"expirationDateTime": "2018-11-15T11:00:00.0000000Z",
"clientState": "secretClientValue"
microsoft-graph microsoft-graph-security
microsoft-graph microsoft-graph-security
asked Nov 14 '18 at 20:27
Wes K.Wes K.
112
112
Wes, can you share the actual request url you are using here too? just to be double sure.
– Jeremy Thake MSFT
Nov 15 '18 at 16:40
add a comment |
Wes, can you share the actual request url you are using here too? just to be double sure.
– Jeremy Thake MSFT
Nov 15 '18 at 16:40
Wes, can you share the actual request url you are using here too? just to be double sure.
– Jeremy Thake MSFT
Nov 15 '18 at 16:40
Wes, can you share the actual request url you are using here too? just to be double sure.
– Jeremy Thake MSFT
Nov 15 '18 at 16:40
add a comment |
2 Answers
2
active
oldest
votes
Wes, you didn't post the URL that you sent that request to. As per the documentation for Security Alerts.
You can use Microsoft Graph webhooks to subscribe to and receive notifications about updates to Microsoft Graph Security entities.
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/security-api-overview
On that page, it states posting a request and gives a sample like this
POST https://graph.microsoft.com/v1.0/subscriptions
Content-Type: application/json
"changeType": "created,updated",
"notificationUrl": "https://webhook.azurewebsites.net/notificationClient",
"resource": "/me/mailfolders('inbox')/messages",
"expirationDateTime": "2016-03-20T11:00:00.0000000Z",
"clientState": "SecretClientState"
https://developer.microsoft.com/en-us/graph/docs/concepts/webhooks
Are you posting that request body to that url?
add a comment |
Please use 'updated' for 'changeType'. Security/Alerts uses 'updated' for all new or updated alerts.
Perfect, this solved the issue. Suggest adding more descriptive feedback in the 400 and maybe updating the docs to not include "created" in the sample changeType.
– Wes K.
Nov 16 '18 at 18:31
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53308251%2fcreating-a-microsoft-graph-webhook-subscription-to-security-alerts-fails%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Wes, you didn't post the URL that you sent that request to. As per the documentation for Security Alerts.
You can use Microsoft Graph webhooks to subscribe to and receive notifications about updates to Microsoft Graph Security entities.
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/security-api-overview
On that page, it states posting a request and gives a sample like this
POST https://graph.microsoft.com/v1.0/subscriptions
Content-Type: application/json
"changeType": "created,updated",
"notificationUrl": "https://webhook.azurewebsites.net/notificationClient",
"resource": "/me/mailfolders('inbox')/messages",
"expirationDateTime": "2016-03-20T11:00:00.0000000Z",
"clientState": "SecretClientState"
https://developer.microsoft.com/en-us/graph/docs/concepts/webhooks
Are you posting that request body to that url?
add a comment |
Wes, you didn't post the URL that you sent that request to. As per the documentation for Security Alerts.
You can use Microsoft Graph webhooks to subscribe to and receive notifications about updates to Microsoft Graph Security entities.
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/security-api-overview
On that page, it states posting a request and gives a sample like this
POST https://graph.microsoft.com/v1.0/subscriptions
Content-Type: application/json
"changeType": "created,updated",
"notificationUrl": "https://webhook.azurewebsites.net/notificationClient",
"resource": "/me/mailfolders('inbox')/messages",
"expirationDateTime": "2016-03-20T11:00:00.0000000Z",
"clientState": "SecretClientState"
https://developer.microsoft.com/en-us/graph/docs/concepts/webhooks
Are you posting that request body to that url?
add a comment |
Wes, you didn't post the URL that you sent that request to. As per the documentation for Security Alerts.
You can use Microsoft Graph webhooks to subscribe to and receive notifications about updates to Microsoft Graph Security entities.
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/security-api-overview
On that page, it states posting a request and gives a sample like this
POST https://graph.microsoft.com/v1.0/subscriptions
Content-Type: application/json
"changeType": "created,updated",
"notificationUrl": "https://webhook.azurewebsites.net/notificationClient",
"resource": "/me/mailfolders('inbox')/messages",
"expirationDateTime": "2016-03-20T11:00:00.0000000Z",
"clientState": "SecretClientState"
https://developer.microsoft.com/en-us/graph/docs/concepts/webhooks
Are you posting that request body to that url?
Wes, you didn't post the URL that you sent that request to. As per the documentation for Security Alerts.
You can use Microsoft Graph webhooks to subscribe to and receive notifications about updates to Microsoft Graph Security entities.
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/security-api-overview
On that page, it states posting a request and gives a sample like this
POST https://graph.microsoft.com/v1.0/subscriptions
Content-Type: application/json
"changeType": "created,updated",
"notificationUrl": "https://webhook.azurewebsites.net/notificationClient",
"resource": "/me/mailfolders('inbox')/messages",
"expirationDateTime": "2016-03-20T11:00:00.0000000Z",
"clientState": "SecretClientState"
https://developer.microsoft.com/en-us/graph/docs/concepts/webhooks
Are you posting that request body to that url?
answered Nov 15 '18 at 17:07
Jeremy Thake MSFTJeremy Thake MSFT
8121511
8121511
add a comment |
add a comment |
Please use 'updated' for 'changeType'. Security/Alerts uses 'updated' for all new or updated alerts.
Perfect, this solved the issue. Suggest adding more descriptive feedback in the 400 and maybe updating the docs to not include "created" in the sample changeType.
– Wes K.
Nov 16 '18 at 18:31
add a comment |
Please use 'updated' for 'changeType'. Security/Alerts uses 'updated' for all new or updated alerts.
Perfect, this solved the issue. Suggest adding more descriptive feedback in the 400 and maybe updating the docs to not include "created" in the sample changeType.
– Wes K.
Nov 16 '18 at 18:31
add a comment |
Please use 'updated' for 'changeType'. Security/Alerts uses 'updated' for all new or updated alerts.
Please use 'updated' for 'changeType'. Security/Alerts uses 'updated' for all new or updated alerts.
answered Nov 15 '18 at 23:49
SFBUSFBU
1
1
Perfect, this solved the issue. Suggest adding more descriptive feedback in the 400 and maybe updating the docs to not include "created" in the sample changeType.
– Wes K.
Nov 16 '18 at 18:31
add a comment |
Perfect, this solved the issue. Suggest adding more descriptive feedback in the 400 and maybe updating the docs to not include "created" in the sample changeType.
– Wes K.
Nov 16 '18 at 18:31
Perfect, this solved the issue. Suggest adding more descriptive feedback in the 400 and maybe updating the docs to not include "created" in the sample changeType.
– Wes K.
Nov 16 '18 at 18:31
Perfect, this solved the issue. Suggest adding more descriptive feedback in the 400 and maybe updating the docs to not include "created" in the sample changeType.
– Wes K.
Nov 16 '18 at 18:31
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53308251%2fcreating-a-microsoft-graph-webhook-subscription-to-security-alerts-fails%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Wes, can you share the actual request url you are using here too? just to be double sure.
– Jeremy Thake MSFT
Nov 15 '18 at 16:40