0

I need to read the tasks in a Plan on a daily batch process. I am retreiving the Plan ID during registration process by delegated permissions and save this ID in the application's database. On the daily batch process I am trying to access this Plan's tasks using; https://graph.microsoft.com/v1.0/planner/plans/{Plan ID}/tasks

I am getting "401 - Unauthorized: Access is denied due to invalid credentials" error. I've got the following permissions in the screenshot below, am I missing the required one or is it not possible to access this service with Application type permission?

Permission List

  • As per the error, credentials are invalid and it doesnt seem to be permission issue. Were you able to execute any rest call and get results with the same credentials. I tried with same permission as yours and was able to get the results using postman. Can you try postman and see if call to any other endpoint is working? – Abhijeet Jadhav Jan 26 '20 at 19:42

1 Answers1

0

Application permissions are now supported.

Outdated Reply:

Application permissions are coming: https://devblogs.microsoft.com/microsoft365dev/announcing-updates-to-the-planner-api-in-microsoft-graph/

Before that is live as a workaround to your problem, you can create an account to act as a user for the application, and add that to the groups you are interested as a member.

Tarkan Sevilmis
  • 1,443
  • 7
  • 9
  • Thanks for the suggestion, it would work for me. As a member of that group, how can I simulate the sign on process? I thought you could only do browser single sign on for delegated permissions. Is there a way to code that login process? – user3449856 Jan 27 '20 at 22:05
  • I'm sure there is, but I don't know the details. I think your best bet is to search for existing questions or ask a new question directly about how to get the token. Describing your environment in more detail would help area experts to point you in the right direction. – Tarkan Sevilmis Jan 28 '20 at 02:24
  • I've made some more research and it looks like there is no way to programmatically getting delegate auth token. For anything to do programmatically, I need application type permission. I will change the working flow to match this. I might ask someone from the team to login to our dashboard on a daily basis to refresh the reports until Application permission is enabled for Planner, hopefully sooner than later. – user3449856 Jan 28 '20 at 08:43