I have been struggling with accessing planner data from office 365 using an application which I have setup in Azure. I have been able to successfully retrieve licensing and user information, but am unable to get a list of user tasks (from Planner).
Further Clarification:
- I am trying to access other users planner data tasks, not my own.
- This is not a user facing application, a user never logs in. I am using the REST interface using my registered apps client/secret key in order to obtain a token which is used for subsequent requests. I am not logging in as a user, i am logging in as an application, there for using 'me' would not work as it does in the graph api explorer.
- Communication is succeeding, and I am able to read and write any OTHER user data without issue. The problem seems to be spelled out clearly that the application being used does not have authorization to view the planner data, but I have given this application all privileges and still get a 401 when trying to read planner data.
- I'm not sure the technologies used are relevant, but for the sake of providing as much detail as possible, I am using nodejs and the adal-node (https://github.com/AzureAD/azure-activedirectory-library-for-nodejs)
Graph Documentation: https://graph.microsoft.io/en-us/docs/api-reference/beta/api/user_list_tasks
The document clearly states the required scopes to execute this are Group.ReadWrite.All AND Tasks.ReadWrite which I have supplied to the application (as well as tons of other permissions, as I was becoming desperate and annoyed). All Application Permissions and all Delegated Permissions are checked for each of the applications listed below. I will remove the necessary ones after I get this working, but I figured this will help alleviate the "Have you tried checking this.. or that.. responses"
I realize this is in beta, but was hoping to make use of it, and thought maybe someone else had better luck.
I have attempting forming the request both of the following ways: https://graph.microsoft.com/beta/users/[username]/plans https://graph.microsoft.com/beta/tasks?$filter=createdBy eq '[username]'
Both produce the following result (most of message has been removed due to length):
{ error:
{ code: 'UnknownError',
message: '...<h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>\r\n <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>...',
innerError:
{ 'request-id': '09ef3a04-7fc2-48a0-9570-7f04171e45ed',
date: '2016-05-11T14:18:12' } } }