Cannot request todo/lists of other users server side?

Greg Merideth 0 Reputation points
2024-04-12T14:12:13.89+00:00

After assigning the appropriate permissions in the application scope, when we call the link below the response is shown as "InvalidRequest" with "ErrorIncorrectRoutingHint" as the message.

https://graph.microsoft.com/v1.0/users/user@user.com/todo/lists

Does this feature not work yet?

https://graph.microsoft.com/v1.0/users/user@user.com/todo/lists
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,647 questions
{count} votes

2 answers

Sort by: Most helpful
  1. awijekoon 950 Reputation points Microsoft Vendor
    2024-04-13T03:50:01.0766667+00:00

    It is not available for Application permission yet. documentation

    The To Do API currently only supports permission delegated by the user and is limited to the current user. This means that you cannot access other users' to-do lists.User's image

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments

  2. Yakun Huang-MSFT 235 Reputation points Microsoft Vendor
    2024-04-17T03:04:26.7333333+00:00

    Hi @Greg Merideth

    The "InvalidRequest" error may be due to the fact that you are using delegated permissions, for delegated permissions are only used to access the /me/todo/lists endpoint, if you need to access other users' tasklists, you need to add the application permission(Tasks.Read.All) to the app, and then use OAuth 2.0 client credentials flow, for the detailed use of this flow, you can check the link below, as shown in the figure is my test results.

    2

    1

    For more information about the OAuth 2.0 client credentials flow, you can see this link:

    https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    0 comments No comments