Jeann Pierre
Jeann Pierre

Reputation: 131

Why Can't I GET 'Tasks' from Microsoft Graph Unified API?

I'm trying to build an app demo that will create tasks for users in Outlook. I've been trying using the Microsoft Graph API but I cannot GET data about the tasks.

I'm using Postman (google extension app) to send the queries and I am providing a valid access token.

GET https://graph.microsoft.com/beta/me/tasks

And the response is:

  {
  "error": {
    "code": "UnknownError",
    "message": "Users must consent to all of the following scopes: Group.ReadWrite.All,Tasks.ReadWrite",
    "innerError": {
      "request-id": "f8595b76-1ad9-4ad3-af52-2e1028f01879",
      "date": "2015-12-08T18:55:02"
    }
  }
}

Why can I not access the tasks for my user? In Service Manager (Visual Studio) I checked all permissions.

As a user I allowed the app to have these permissions. I did not 'revoke' permissions.

Upvotes: 0

Views: 2351

Answers (2)

Mike Holtkamp
Mike Holtkamp

Reputation: 94

There is a beta version of the outlook see Outlook Task REST APi on https://msdn.microsoft.com/en-us/office/office365/api/task-rest-operations

Upvotes: 0

Marek Rycharski
Marek Rycharski

Reputation: 1704

Please use the Azure Management portal (https://manage.windowsazure.com) to configure the required delegated permissions for your app.

Your request had the following scopes in the token: Calendars.ReadWrite Contacts.ReadWrite Mail.ReadWrite Mail.Send MyFiles.Write User.Read. It didn't have Group.ReadWrite.All and Tasks.ReadWrite scopes required for this API call.

Please also note that the tasks exposed by the Microsoft Graph API are the Office 365 Planner tasks (see https://tasks.office.com) and not the Outlook tasks.

Upvotes: 2

Related Questions