-
Couldn't load subscription status.
- Fork 30
Description
Expected behavior
A request to the delta API with non-empty deltaLink provided should return users modified as per the deltaToken in the link.
UserDeltaCollectionRequest.deltaLink(deltaLink) should add the deltaToken to the request.
BaseDeltaCollectionRequest.getDeltaTokenFromLink(deltaLink) should return abc from the string https://graph.microsoft.com/v1.0/users/microsoft.graph.delta?$deltatoken=abc
Actual behavior
UserDeltaCollectionRequest.deltaLink(deltaLink) adds an empty string, because BaseDeltaCollectionRequest.getDeltaTokenFromLink(deltaLink) returns an empty string.
Steps to reproduce the behavior
Use the delta API with non-empty deltaLink provided.
Likely cause and fix.
There seems to be an error in the regex pattern used in the BaseDeltaCollectionRequest.getDeltaTokenFromLink(deltaLink) function.
Current pattern is: "(?i)(?>\$?delta)?token=['"]?([\w-\.]+)"
The following pattern should work: "(?i)(?>\$?delta)?token=['"]?([\w\-\.]+)", where the missing escape before "-" is added.