We are seeing errors raised by this module which actually mask the real errors raised by the backend.
So far we have seen two errors raised:
Conversion from JSON failed with error: Unexpected character encountered while parsing value: S. Path '', line 0, position 0.
Conversion from JSON failed with error: Error parsing NaN value. Path '', line 1, position 1.
and using Fiddler these appear to occur when the backend produces these errors:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD><TITLE>Service Unavailable</TITLE><META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD><BODY><h2>Service Unavailable</h2><hr><p>HTTP Error 503. The service is unavailable.</p></BODY></HTML>
Microsoft.Exchange.Data.Directory.ADServerSettingsChangedException|An error caused a change in the current set of domain controllers
Microsoft.Exchange.Data.Directory.ADInvalidHandleCookieException|Active Directory operation failed on BYAPR15A02DC006.NAMPR15A002.PROD.OUTLOOK.COM. Additional information: Active Directory rejected paged search cookie because a cookie handle was discarded by a Domain Controller or a different LDAP connection was used on subsequent page retrieval. Paged search needs to be restarted and will succeed.\r\nAdditional information: The parameter is incorrect.\r\nActive directory response: 00000057: LdapErr: DSID-0C090B19, comment: Error processing control, data 0, v4563.
So either the retry logic is not working, or the module is not handling these errors, as it seems to be blindly trying to convert a response to JSON without considering it could be an exception.
This has been reported to Microsoft and will be 'considered for future enhancements'.
They have indicated that domain controllers becoming unavailable would cause these issues, particularly on paged results.