Open arcadiogarcia opened 5 years ago
I'm experimenting a bit more with the Graph explorer and looks like if I do
GET https://graph.microsoft.com/v1.0/me/onenote/pages/<PAGEID>
It actually returns some metadata (id, title, date modified...), but if I try to do
DELETE https://graph.microsoft.com/v1.0/me/onenote/pages/<PAGEID>
it tells me
{
"error": {
"code": "20113",
"message": "The specified resource has been deleted.",
"innerError": {
"request-id": "b80fbb6f-d0ae-47cc-8e05-7d2c172f4c87",
"date": "2019-02-25T00:36:09"
}
}
}
Ok, I think I found out what is happening, I followed the oneNoteClientUrl
to see what would the OneNote app do (since according to it the page is already deleted), and it brought me to a special "Deleted pages" section. According to it:
So it would seem that the page is stuck in that limbo, where the API lists it as an existing page but it won't allow me to access the preview or delete it. How are API users expected to filter out these pages? I would expect some kind of flag indicating that the page is deleted.
@billpetrakos Can you answer this question about how to determine whether a page has been deleted with the API?
As you said, it seems like the problem is that the deleted page is in that special "Deleted pages" section. I will try to fix our API for this scenario. Meanwhile, you can restore the page and then delete it from OneNote Online or using our Delete-page API at https://docs.microsoft.com/en-us/graph/api/page-delete?view=graph-rest-1.0
That should fix your Pages query
@manjushm-microsoft Thank you for the response. Can you update your internal tracking item with a link to this issue so that you can follow up here when this is resolved?
@manjushm-microsoft Has the API been fixed for this scenario?
Sorry, we actually "Won't Fix"ed it since there is a work around for this
@manjushm-microsoft What is the workaround? If it is the one you mentioned earlier in the thread it works for testing but it is not a valid workaround for real scenarios, since the end user is the one that has to go through the page restoration steps.
found the same bug within Android SDK, IOS SDK and even MS Graph Explorer.
@manjushm-microsoft could you share what is the workaround? @arcadiogarcia were you able to resolve this?
This makes the whole OneNote API simply unusable as there is no way to distinguish between deleted sections or notes from the existing ones.
@AndroidGecko I wasn't able to resolve this :( @manjushm-microsoft can you point us to a valid workaround? This is a BIG blocker for developing apps that list OneNote pages.
Alright let me check with my team if we can bump up the priority of this issue. I will let you know. Thanks!
Thank you for reporting this issue. This appears to be an issue or limitation with the service APIs. Unfortunately, as the Microsoft Graph SDK team, we do not have ownership of the APIs that are causing you issues. We invite you to create a question about the service API to Microsoft Q&A and tagged with one of the [microsoft-graph-*] tags, that way it will get routed to the appropriate team for them to triage:
https://aka.ms/msgraphsupport or directly https://aka.ms/askgraph
For now, we will close the issue on our side but feel free to open it in the relevant repository if you think the issue is specific to SDK. Please let us know if this helps!
Note: We will close this repository on April 19, 2024.
Please provide the following (and please check them off the list with [x]) before submitting this issue:
Expected behavior
In my app, I added a page to an existing OneNote section using the following code:
After doing so, the app was showing up as expected when listing the pages of the section and I was able to retrieve its content. Eventually, I deleted that page using the OneNote Windows 10 app. I would expect the page to not be returned in the graph results anymore.
Actual behavior
After deleting the page, any attempt to load that section with this code fails:
For some reason the list of pages returned for the section still includes the deleted section, but when I try to get the preview I get this error:
The error makes sense, since I deleted the page, but I don't understand why it is being returned when I list the pages. Is there some kind of "deleted" flag I should be using to filter the pages or is this a service bug?
Steps to reproduce the behavior
I'm using version 1.12.0 of the sdk
AB#7318