Unable to access a specific plan using MS Graph

Occasional Visitor

I am attempting to list the tasks in a specific planner and I am using the following Python code:

 

listTasksURL = "https://graph.microsoft.com/v1.0/planner/plans/c924e9b8-a4b9*****/tasks"

listTasksHeaders = {}
listTasksHeaders['Authorization'] = accessToken 

r= requests.get(url = listTasksURL, headers = listTasksHeaders)
execution = r.json()
print(execution)

 

The response is:

401 - Unauthorized: Access is denied due to invalid credentials.

 

I am using an Azure AD app with the following permissions:

ChannelMessage.Read.All

Group.Read.All

IdentifyRiskyUser.ReadWrite.All

Tasks.ReadWrite.Shared

Teamwork.Migrate.All

 

I can get the task list using the "me" endpoint and my own account, but not using the Azure app with Oauth. Am I missing permissions? Do I have to make changes on the planner side? 

 

0 Replies