You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to upgrade the MS Graph SDK from 4.x to 5.11 and encountered the following problem:
I've previously used NextPageRequests to access the next page of a delta request I made but since this features was removed in 5.x I'm trying to use the PageIterator to make Delta-Requests.
I'm creating the PageIterator like this:
When I then call await iterator.IterateAsync() it works the first time without any problems.
Note that I currently don't have any mails in the folder I'm listening to. I'm simply trying to check for changes every x-seconds.
Since the iterator couldn't find any changes, the API returned a DeltaLink and the NextLink is set to string.Empty as seen in the class PageIterator.cs:
Since I don't have any new changes inside the watched folder, the next request made also returns a DeltaLink instead of a NextLink.
But since there is no NextLink inside the the AdditionalData inside of the _currentPage, the method ExtractNextLinkFromParsable returns an empty string, as seen here:
// the next link property may not be defined in the response schema so we also check its presence in the additional data bagreturn parsableCollection.AdditionalData.TryGetValue(CoreConstants.OdataInstanceAnnotations.NextLink,outvar nextLink)? nextLink.ToString():string.Empty;
But this is a problem, because the PageIterator assigned the NextLink to string.Empty in the last request and now this request returns a string.Empty as well, so the PageIterator thinks that I am inside a NextLink loop and throws an exception.
So now my question:
Am I doing something wrong? Am I not supposed to use the PageIterator like this? Is there any better way to check for changes with a Delta-Request? I've tried to follow this microsoft turorial for delta-requests: https://learn.microsoft.com/en-us/graph/delta-query-users?tabs=http
But the QueryParameters don't have a SkipToken or DeltaToken anymore and since the PageIterator has a DeltaState I thought I should be able to use it instead.
Thanks in advance
The text was updated successfully, but these errors were encountered:
I just wanted to ask if there is anything new regarding this issue?
Do I need to provide further info? If there's something not clear just point it out and I'll try to explain it.
It is the same in Python SDK. I think currently SkipToken and DeltaToken are not supported at all. And the worst part is that you can't pass arbitrary headers to QueryParameters. Then I could easily do the paging and delta by myself.
Hello,
I'm trying to upgrade the MS Graph SDK from 4.x to 5.11 and encountered the following problem:
I've previously used
NextPageRequests
to access the next page of a delta request I made but since this features was removed in 5.x I'm trying to use thePageIterator
to make Delta-Requests.I'm creating the
PageIterator
like this:When I then call
await iterator.IterateAsync()
it works the first time without any problems.Note that I currently don't have any mails in the folder I'm listening to. I'm simply trying to check for changes every x-seconds.
Since the iterator couldn't find any changes, the API returned a
DeltaLink
and theNextLink
is set tostring.Empty
as seen in the classPageIterator.cs
:When I then try to call
ResumeAsync()
ORIteratorAsync()
once more, I get this error message:Detected nextLink loop. Nextlink value:
I debugged the code to find the code that throws this exception and found this inside the
PageIterator.cs
class:Since I don't have any new changes inside the watched folder, the next request made also returns a
DeltaLink
instead of aNextLink
.But since there is no
NextLink
inside the theAdditionalData
inside of the_currentPage
, the methodExtractNextLinkFromParsable
returns an empty string, as seen here:But this is a problem, because the
PageIterator
assigned theNextLink
tostring.Empty
in the last request and now this request returns astring.Empty
as well, so thePageIterator
thinks that I am inside aNextLink
loop and throws an exception.So now my question:
Am I doing something wrong? Am I not supposed to use the
PageIterator
like this? Is there any better way to check for changes with a Delta-Request? I've tried to follow this microsoft turorial for delta-requests: https://learn.microsoft.com/en-us/graph/delta-query-users?tabs=httpBut the
QueryParameters
don't have aSkipToken
orDeltaToken
anymore and since thePageIterator
has aDelta
State
I thought I should be able to use it instead.Thanks in advance
The text was updated successfully, but these errors were encountered: