I use the MS Graph API to upload data to OneDrive. I have deleted all data on OneDrive, but when I use the :
var search = await graphClient.Users[user.Id].Drive.Root
.Search("")
.Request()
.GetAsync();
foreach (var item in search)
{
Console.WriteLine(item.Name);
}
I get data displayed even though my OneDrive is empty, why ?
I use: .Net 4.7.2, Visual Studio
The solution is:
If I use this code:
var search = await graphClient.Users[user.Id].Drive.Root
.Search("")
.Request()
.GetAsync();
He's searching through the index. Data can also be displayed there although it is no longer available.
Therefore, data that is no longer available on OneDrive is also displayed.
Do not use the search function.