microsoftgraph / microsoftgraph/msgraph-sdk-python
API endpoint users.by_user_id(self.user_id).get().todo.lists.get() does not work
@Serrindipity is already working on this.
Since Oct 2, 2024.
- Dominant language
- Python
- Stars
- 630
- Forks
- 96
- Avg merge
- 15h 20m
- Merged PRs (30d)
- 3
Description
Describe the bug
I am trying to get all of my task lists. I have my app set up with the ClientSecretCredential flow, and when I call the following:
user = await self.app_client.users.by_user_id(self.user_id).get()
in order to call:
res2= await user.todo.lists.get()
the todo field is None:
User(additional_data={'@odata.context': 'https://graph.microsoft.com/v1.0/$metadata#users/$entity'}, ... todo=None, ... )
which means that the previous call to users.todo.lists errors with AttributeError: 'NoneType' object has no attribute 'lists'
Is this expected behavior? If so, how do I call this endpoint?
Expected behavior
In the graph explorer, the query:
GET https://graph.microsoft.com/v1.0/users/{userid}/todo/lists
returns all of my task lists. I'd like the above code snippets to also return the lists.
How to reproduce
Initialize Graph and app_client as in this tutorial then:
user = await self.app_client.users.by_user_id(USER_ID).get()
res2 = await user.todo.lists.get()
SDK Version
1.8.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
- OS: MacOS Sonoma 14.3
### Other information
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.