Closed Bananovics closed 1 year ago
Adding to that this announcement from Microsoft: https://techcommunity.microsoft.com/t5/exchange-team-blog/announcing-deprecation-of-remote-powershell-rps-protocol-in/ba-p/3695597
Thanks for the heads up. I will push out an update for v3.0.0 compatibility before the depreciation.
I can confirm this. As soon as you use any version higher than 2.0.5, the issue occurs. Though the issue only seems to occur with certificate-based authentication and only if you try to get more than 1000 objects. If I just run Connect-ExchangeOnline
and run (Get-Contact).Count
, the error does not appear and I get the full amount of contacts.
What are the Exchange Management v3 equivalents to the Cmdlets Get-User
, Get-Contact
, and Get-MailContact
? The documentation does not list any equivalents for them.
Get-Command Get-Ex*
CommandType Name Version Source
----------- ---- ------- ------
Function Get-EXCAllContactFolders 1.7.0.0 ExchangeContacts
Function Get-EXCContact 1.7.0.0 ExchangeContacts
Function Get-EXCContactFolder 1.7.0.0 ExchangeContacts
Function Get-EXCContactGroup 1.7.0.0 ExchangeContacts
Function Get-EXCContactGroups 1.7.0.0 ExchangeContacts
Function Get-EXCContacts 1.7.0.0 ExchangeContacts
Function Get-EXCDumpsterContacts 1.7.0.0 ExchangeContacts
Function Get-EXCPrivacyReport 1.7.0.0 ExchangeContacts
Cmdlet Get-ExecutionPolicy 3.0.0.0 Microsoft.PowerShell.Security
Cmdlet Get-EXOCasMailbox 2.0.5 ExchangeOnlineManagement
Cmdlet Get-EXOMailbox 2.0.5 ExchangeOnlineManagement
Cmdlet Get-EXOMailboxFolderPermission 2.0.5 ExchangeOnlineManagement
Cmdlet Get-EXOMailboxFolderStatistics 2.0.5 ExchangeOnlineManagement
Cmdlet Get-EXOMailboxPermission 2.0.5 ExchangeOnlineManagement
Cmdlet Get-EXOMailboxStatistics 2.0.5 ExchangeOnlineManagement
Cmdlet Get-EXOMobileDeviceStatistics 2.0.5 ExchangeOnlineManagement
Cmdlet Get-EXORecipient 2.0.5 ExchangeOnlineManagement
Cmdlet Get-EXORecipientPermission 2.0.5 ExchangeOnlineManagement
All Cmdlets Get-EXCContact*
seem to be related to user mailbox contacts.
Thanks for the heads up. I will push out an update for v3.0.0 compatibility before the depreciation.
Hi! Can you please give update when the v3.0.0 update is expected?
Hi! Can you please give update when the v3.0.0 update is expected?
@Bananovics I'm aiming for early/mid-June.
I've opened a ticket with Microsoft and am awaiting feedback. The new version of ExchangeOnline broke the Get-User function when returning 1000+ users. There are more details about the bug linked below...
https://github.com/MicrosoftDocs/office-docs-powershell/issues/10907
Hi, same issue with get-unifiedgroup function, is this broke too, like Get-User?
Thanks, Regards.
@pleongomez I think so. From what I've experienced, all of the non-ExO commands fail when returning 1000+ objects. Specifically, when using certificate authentication with 3.1.0 REST API. Hopefully, Microsoft gets back to me soon.
I found a comment here: https://techcommunity.microsoft.com/t5/exchange-team-blog/announcing-deprecation-of-remote-powershell-rps-protocol-in/ba-p/3695597/page/2#comments
Says: "UPDATE: issue has been resolved. Just in case anybody else is getting the weird 'Expired or Invalid pagination request' error when using REST to fetch more than 1000 objects: apparently, you get this issue if you aren't using the .onmicrosoft.com domain for the -Organization parameter (although this does work in most cases). Documentation for Connect-ExchangeOnline does state that 'you must use the primary .onmicrosoft.com domain of the organization', so be sure to check that."
I do not know if it helps but I thought it's worth to sharing
Just an update: Microsoft responded to our ticket by saying that the behavior is currently "by design" and to leave feedback here: https://feedbackportal.microsoft.com/feedback/post/. I'll have to find another workaround.
I found a comment here: https://techcommunity.microsoft.com/t5/exchange-team-blog/announcing-deprecation-of-remote-powershell-rps-protocol-in/ba-p/3695597/page/2#comments
Says: "UPDATE: issue has been resolved. Just in case anybody else is getting the weird 'Expired or Invalid pagination request' error when using REST to fetch more than 1000 objects: apparently, you get this issue if you aren't using the .onmicrosoft.com domain for the -Organization parameter (although this does work in most cases). Documentation for Connect-ExchangeOnline does state that 'you must use the primary .onmicrosoft.com domain of the organization', so be sure to check that."
I do not know if it helps but I thought it worth to share.
@Bananovics Thanks for researching this. Unfortunately, I still experience the same issue even when using our .onmicrosoft.com domain. Maybe someone else could have better luck?
I finally figured this out by throwing everything at the wall and seeing what stuck. For some reason, including the "ConnectionURI" parameter with the Connect-ExchangeOnline cmdlet was the culprit. After removing this, everything is working fine. A new version is coming soon.
Resolved by commit 06e195781665c44f3e9a63052953d64ff4148f39, please see the latest version.
Hi,
Script is working fine with ExchangeOnlineManagement version 2.0.5 but it is not with 3.0.0. Similar issue described here: https://learn.microsoft.com/en-us/answers/questions/1023619/connect-exchangeonline-write-errormessage-expired.html
Can you please update commands in your script to solve limitations with version 3.0.0?