Q:

Universal Windows App (UWP) office 365 API - Read calendar event using rest API

My Code...
 HttpClient client = new HttpClient();
                var token = await AuthenticationHelper.GetTokenForUserAsync();
                client.DefaultRequestHeaders.Add("Accept", "application/json");
                client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

                HttpResponseMessage response = await client.GetAsync(new Uri("https://graph.microsoft.com/v1.0/me/events"));

                if (!response.IsSuccessStatusCode)
                {

                    throw new Exception(response.StatusCode.ToString());
                }

I have used this documentation
https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_list_events
And this github example
https://github.com/microsoftgraph/uwp-csharp-connect-rest-sample
I got this error..
{StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  client-request-id: 0de835e0-91d0-444d-bddc-a00b0d270eeb
  Server: Microsoft-IIS/8.5
  request-id: 0de835e0-91d0-444d-bddc-a00b0d270eeb
  Transfer-Encoding: chunked
  x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"South India","Slice":"SliceA","ScaleUnit":"002","Host":"AGSFE_IN_2","ADSiteName":"MAA"}}
  Duration: 1047.8402
  Cache-Control: private
  Date: Mon, 26 Sep 2016 06:55:15 GMT
  X-Powered-By: ASP.NET
  Content-Type: application/json
}}

A:

Take a look at the AuthenticationHelper.cs class. The Scopes array includes only the User.Read and Mail.Send permissions. In order to read calendar events, you'll need to request the Calendars.Read scope. You can also look at the uwp-snippets-rest sample if you want to know how to perform other operations and request additional scopes. Also take a look at the Microsoft Graph permission scopes document for a list of the available permission scopes and the operations each scope enables.

