API endpoint users.by_user_id(self.user_id).get().todo.lists.get() does not work

Ouverte
#910 3 commentaires 0 réactions 2 personnes assignées Voir sur GitHub

@Serrindipity y travaille déjà.

Depuis le 2/10/2024.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

status:waiting-for-triage type:bug
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_
Langage dominant
Python
Étoiles
630
Forks
96
Merge moyen
15 h 20 min
PR mergées (30 j)
3

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de microsoftgraph/msgraph-sdk-python

Toutes les issues de microsoftgraph/msgraph-sdk-python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.