microsoftgraph / microsoftgraph/msgraph-sdk-python

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

Đang mở
#910 3 bình luận 0 reaction 2 người được giao Xem trên GitHub

@Serrindipity đang làm issue này rồi.

Từ ngày 2/10/2024.

status:waiting-for-triage type:bug
Ngôn ngữ chính
Python
Star
630
Fork
96
Merge trung bình
15 giờ 20 phút
Pull request đã merge (30 ngày)
3

Mô tả

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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.