{"action":"created","issue":{"url":"https://api.github.com/repos/microsoftgraph/aspnet-webhooks-rest-sample/issues/18","repository_url":"https://api.github.com/repos/microsoftgraph/aspnet-webhooks-rest-sample","labels_url":"https://api.github.com/repos/microsoftgraph/aspnet-webhooks-rest-sample/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/microsoftgraph/aspnet-webhooks-rest-sample/issues/18/comments","events_url":"https://api.github.com/repos/microsoftgraph/aspnet-webhooks-rest-sample/issues/18/events","html_url":"https://github.com/microsoftgraph/aspnet-webhooks-rest-sample/issues/18","id":312639990,"number":18,"title":"Microsoft Graph - Asp.net Webhooks Rest Sample - Subscription response error","user":{"login":"krupathakker","id":38225016,"avatar_url":"https://avatars3.githubusercontent.com/u/38225016?v=4","gravatar_id":"","url":"https://api.github.com/users/krupathakker","html_url":"https://github.com/krupathakker","followers_url":"https://api.github.com/users/krupathakker/followers","following_url":"https://api.github.com/users/krupathakker/following{/other_user}","gists_url":"https://api.github.com/users/krupathakker/gists{/gist_id}","starred_url":"https://api.github.com/users/krupathakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krupathakker/subscriptions","organizations_url":"https://api.github.com/users/krupathakker/orgs","repos_url":"https://api.github.com/users/krupathakker/repos","events_url":"https://api.github.com/users/krupathakker/events{/privacy}","received_events_url":"https://api.github.com/users/krupathakker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-09T18:35:46Z","updated_at":"2018-05-17T19:30:58Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI am following the steps mentioned in the given forum: https://github.com/microsoftgraph/aspnet-webhooks-rest-sample.\r\n\r\nI am using ngrok for the localhost endpoints. I have updated the keys like client id, client secret key, notificaiton url in the web.config. The app is registered in Azure Active Directory.\r\n\r\nWhile sending request to the microsoft graph to subscribe to users email, \r\n HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, subscriptionsEndpoint);\r\n            Subscription subscription = new Subscription\r\n            {\r\n                Resource = \"me/mailFolders('Inbox')/messages\",\r\n                //Resource = \"me/events\",\r\n                ChangeType = \"created\",\r\n                NotificationUrl = ConfigurationManager.AppSettings[\"ida:NotificationUrl\"],\r\n                ClientState = Guid.NewGuid().ToString(),\r\n                //ExpirationDateTime = DateTime.UtcNow + new TimeSpan(0, 0, 4230, 0) // current maximum timespan for messages\r\n                ExpirationDateTime = DateTime.UtcNow + new TimeSpan(0, 0, 15, 0) // shorter duration useful for testing\r\n            };\r\n\r\nI am getting below error:\r\nAn error occurred while processing your request.\r\nNotFound\r\n{\r\n  \"error\": {\r\n    \"code\": \"ExtensionError\",\r\n    \"message\": \"Operation: Create; Exception: [Status Code: NotFound; Reason: Not Found]\",\r\n    \"innerError\": {\r\n      \"request-id\": \"de7d32c4-b634-4193-b06e-adb614b86ec7\",\r\n      \"date\": \"2018-04-09T18:02:45\"\r\n    }\r\n  }\r\n}\r\n\r\nWhen i inspect in the ngrok web interface: http://127.0.0.1:4040/inspect/http\r\nI see below response:\r\nHTTP/1.1 200 OK\r\nCache-Control: private\r\nContent-Type: plain/text; charset=utf-8\r\nServer: Microsoft-IIS/10.0\r\nX-AspNetMvc-Version: 5.2\r\nX-AspNet-Version: 4.0.30319\r\nX-SourceFiles: =?UTF-8?B?QzpcV29ya1xhc3BuZXQtd2ViaG9va3MtcmVzdC1zYW1wbGUtbWFzdGVyXGFzcG5ldC13ZWJob29rcy1yZXN0LXNhbXBsZS1tYXN0ZXJcR3JhcGhXZWJob29rc1xub3RpZmljYXRpb25cbGlzdGVu?=\r\nX-Powered-By: ASP.NET\r\nDate: Mon, 09 Apr 2018 18:00:13 GMT\r\nContent-Length: 48\r\n\r\nNjE3MTc4MjItZDllNi00ZDcwLThiZDYtYmU1YTlkMDUzZTAz  - **This is the validation token**\r\n\r\nHow to fix this error ? What am i doing wrong in this ?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/microsoftgraph/aspnet-webhooks-rest-sample/issues/comments/389982165","html_url":"https://github.com/microsoftgraph/aspnet-webhooks-rest-sample/issues/18#issuecomment-389982165","issue_url":"https://api.github.com/repos/microsoftgraph/aspnet-webhooks-rest-sample/issues/18","id":389982165,"user":{"login":"jasonjoh","id":8966342,"avatar_url":"https://avatars2.githubusercontent.com/u/8966342?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonjoh","html_url":"https://github.com/jasonjoh","followers_url":"https://api.github.com/users/jasonjoh/followers","following_url":"https://api.github.com/users/jasonjoh/following{/other_user}","gists_url":"https://api.github.com/users/jasonjoh/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonjoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonjoh/subscriptions","organizations_url":"https://api.github.com/users/jasonjoh/orgs","repos_url":"https://api.github.com/users/jasonjoh/repos","events_url":"https://api.github.com/users/jasonjoh/events{/privacy}","received_events_url":"https://api.github.com/users/jasonjoh/received_events","type":"User","site_admin":false},"created_at":"2018-05-17T19:30:58Z","updated_at":"2018-05-17T19:30:58Z","author_association":"CONTRIBUTOR","body":"From the error, it makes me think that maybe the user that you're logged in as doesn't have an Exchange Online mailbox?"}}
{"actor":{"display_login":"jasonjoh"}}