Hello,
I'm upgrading my scripts to EXO v3.1.0 due to Microsoft's depreciation of version 2.0.5 at the end of June. Now, I'm running into an error with the below command.
$UserList = Get-User -ResultSize unlimited
When I use certificate-based authentication for Exchange Online and the Get-User command returns over 1000 users, I get the below error every time: "Expired or Invalid pagination request. Default Expiry time is 00:30:00"
TerminatingError(Invoke-WebRequest): "{"error":{"code":"BadRequest","message":"Invalid Operation","innererror":{"message":"Invalid Operation","type":"Microsoft.Exchange.Admin.OData.Core.ODataServiceException","stacktrace":" at Microsoft.Exchange.AdminApi.CommandInvocation.CommandInvocation.InvokeCommand(QueryContext queryContext, CmdletInvokeInputType cmdletInvokeInputType)\r\n at Microsoft.Exchange.Admin.OData.Core.PathSegmentToExpressionTranslator.Translate(OperationImportSegment segment)\r\n at Microsoft.Exchange.Admin.OData.Core.QueryContext.ResolveQuery(ODataContext context, Int32 level)\r\n at Microsoft.Exchange.Admin.OData.Core.Handlers.OperationHandler.Process(IODataRequestMessage requestMessage, IODataResponseMessage responseMessage)\r\n at Microsoft.Exchange.Admin.OData.Core.Handlers.RequestHandler.Process(Stream requestStream)","internalexception":{"message":"Expired or Invalid pagination request. Default Expiry time is 00:30:00","type":"System.Exception","stacktrace":""}}}}"
The newer commands, like Get-ExoMailbox, work fine regardless of the number of users/objects. Any help would be greatly appreciated.