Can't access OneNote or ToDo on personal hotmail account via Graph on AAD

Lachs 1 Reputation point
2022-06-07T02:14:31.777+00:00

I want to use MS Graph to query my personal data from my hotmail account. I've setup AAD and I'm able to access my hotmail account's emails and personal information ( name, phone number etc...) after authenticating but after adding the same permissions for Notes and Tasks that I added for email, I keep getting a "ServiceException: Code: 40001 Message: The request does not contain a valid authentication token." when trying to access either of these APIs.

Is it possible to access these APIs for a personal hotmail email account on AAD? It works for email so I can't understand why other services are unavailable.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,592 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,474 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Givary-MSFT 27,966 Reputation points Microsoft Employee
    2022-06-07T03:54:54.843+00:00

    @Lachs

    Thank you for reaching out to us. As I understand you are trying to access OneNote using personal Hotmail account via Microsoft Graph.

    Wanted to check if you have reviewed the Microsoft Graph permissions for OneNote as per this article https://learn.microsoft.com/en-us/graph/permissions-reference#notes-permissions:~:text=Permission%20scenarios.-,Notes%20permissions,-Delegated%20permissions

    Note: There are few permissions in the OneNote section of the above article where Microsoft Account is supported.

    Error 40001 states - User or application doesnt have the correct permissions. Reference: https://learn.microsoft.com/en-us/graph/onenote-error-codes#:~:text=The%20user%20or%20application%20does%20not%20have%20the%20correct%20permissions.

    For Todo application, reference: https://learn.microsoft.com/en-us/graph/api/resources/todotask?view=graph-rest-1.0

    Review the permissions once as per the above article and let me know if the issue still persists.


  2. Shweta Mathur 27,616 Reputation points Microsoft Employee
    2022-06-07T06:55:00.257+00:00

    Hi @Lachs ,

    Thanks for reaching out.

    I understand you are looking to call Notes and To Do List using Microsoft Graph using personal accounts.

    The error you are getting is because you do not have sufficient permissions to call these Graph API endpoints.

    To call these Graph API endpoints, you would need specific scopes in your access token for Authorization.

    To access the Notes, you would need Notes.Read permission in your scope to call https://graph.microsoft.com/v1.0/me/onenote/notebooks endpoint.

    208982-image.png

    To access to To Do List, you would need Tasks.Read permission in your scope to call https://graph.microsoft.com/v1.0/me/todo/lists

    208973-image.png

    Hope this will help.

    Thanks,
    Shweta

    ---------------------------------------

    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments