Currently, I am using the Microsoft OneNote API (REST) to read the content of OneNote Pages. I have already subscribed for the notifications on the event of any changes happens in any page's content. Microsoft so sends me a notification for every change in the content of any page. They send a combination ofX-Authenticated
user_id
and subscription ID in the webhook. Like this:
{
"value": [
{
"subscriptionId": "WLID-00000000441A2E0C",
"userId": "WLID-1F50AB22CBE04E58"
}
]
}
Recently, MS released the Graph API and recommended to use this one instead of the OneNote API. SO, I am migrating my implementation from OneNote API to Graph API.
I was getting userId
(WLID-1F50AB22CBE04E58
) with X-Authenticated-userId
in the headers of the response of one of this API in OneNote API
https://www.onenote.com/api/v1.0/me/notes/notebooks
But, I am not getting this with Microsoft Graph. There should be a unique identity for each user who is completing the Authentication process.
Where will I get userId
from Microsoft Graph?