EXO V3 is Out — but the REST API is Still in Beta

Morten Skrubbeltrang
4 min readOct 21, 2022

--

The EXO V3 PowerShell module (ExchangeOnlineManagment) was released on September 19, 2022.

The EXO V3 is the general availability release of the Exchange Online PowerShell module with support for REST. EXO V3 no longer requires a remote session to Exchange Online. Instead, it uses the REST API of Exchange Online for fast-performing and robust queries.

Since the support for REST now eliminates the need for a remote PowerShell session, you no longer need to have basic authentication enabled for WinRM (Windows Remote Management) on your system.

Something’s Not Right

Unfortunately, when you start looking into the EXO V3 module, you’ll notice a terrible truth about the REST API.

Using the Verbose parameter, you can see the specific URI being called:

PS C:\> Get-Mailbox lene.hau -Verbose | ft Name,PrimarySmtpAddress
VERBOSE: Computed version info: 3.0.0
VERBOSE: POST https://outlook.office365.com/adminapi/beta/8a35f394-855d-4d13-9f6f-86d8eb24dc6b/InvokeCommand with -1-byte payload
VERBOSE: received 4955-byte response of content type application/json;charset=utf-8
Name PrimarySmtpAddress
----------- ------------------
Lene Hau lene.hau@azure.skrubbeltrang.com

It’s clear that EXO V3 is still referencing a beta version of the Exchange Online REST API.

But EXO V3 is a General Availability release! So how can Microsoft publish a GA release that references a beta REST API?

EXO V3 Smells Like a Beta Release

Since the Exchange Online REST API is still in beta, then you would expect EXO V3 to break the next time the REST API is modified, right?

That would be the case unless: EXO V3 now downloads all Exchange Online PowerShell CmdLets every time you create an Exchange Online connection!

You can see this by connecting to Exchange Online with the Verbose parameter:

PS C:\> Connect-ExchangeOnline -Verbose
VERBOSE: Returning precomputed version info: 3.0.0
VERBOSE: ModuleVersion: 3.0.0
VERBOSE: [ThreadID: #] Trying to get a new token from AAD
VERBOSE: [ThreadID: #] Trying to acquire token based on UI flow
VERBOSE: [ThreadID: #] Acquired new token when no params are passed
VERBOSE: [ThreadID: #] Successfully got a token from AAD
----------------------------------------------------------------------------------------
This V3 EXO PowerShell module contains new REST API backed Exchange Online cmdlets which doesn't require WinRM for Client-Server communication. You can now run these cmdlets after turning off WinRM Basic Auth in your client machine thus making it more secure.
Unlike the EXO* prefixed cmdlets, the cmdlets in this module support full functional parity with the RPS (V1) cmdlets.V3 cmdlets in the downloaded module are resilient to transient failures, handling retries and throttling errors inherently.However, REST backed EOP and SCC cmdlets are not available yet. To use those, you will need to enable WinRM Basic Auth.For more information check https://aka.ms/exov3-module
----------------------------------------------------------------------------------------
VERBOSE: AutoGen EXOModule created at C:\Users\skrubbeltrang\AppData\Local\Temp\tmpEXO_fr2ilkhp.n1k
VERBOSE: Running Configure-AppSettings
VERBOSE: Setting PrintWarningsReceivedFromServer to False
VERBOSE: PageSizes is set to: 1000
VERBOSE: Logs location is reset to C:\Users\skrubbeltrang\AppData\Local\Temp\EXOCmdletTelemetry
VERBOSE: Max directory size reset to 2000000000
VERBOSE: Max log size reset to 100000000
VERBOSE: Log level reset to Default
VERBOSE: Logger reset to null.
VERBOSE: TrackPerformance is set to: False
VERBOSE: ShowProgress is set to: False
VERBOSE: UseMultithreading is set to: True

A PowerShell module just shy of 30 MB is downloaded to the user’s temp folder on every connection to Exchange Online:

To verify that this module holds all the REST API CmdLets, you can use the following command:

PS C:\> (Get-Module tmpEXO_fr2ilkhp.n1k).ExportedFunctions | ft KeyKey
---
Add-AvailabilityAddressSpace
Add-DistributionGroupMember
Add-MailboxFolderPermission
Add-MailboxLocation
Add-MailboxPermission
Add-RecipientPermission
Add-UnifiedGroupLinks
Approve-ElevatedAccessRequest
Clear-ActiveSyncDevice
Clear-MobileDevice
Clear-TextMessagingAccount
Compare-TextMessagingVerificationCode
Complete-MigrationBatch
Deny-ElevatedAccessRequest
Disable-App
Disable-InboxRule
Disable-JournalArchiving
Disable-Mailbox
Disable-SweepRule
Enable-App
Enable-InboxRule
Enable-Mailbox
Enable-SweepRule
Export-MigrationReport
Get-AcceptedDomain
Get-AccessToCustomerDataRequest
Get-ActiveSyncDevice
Get-ActiveSyncDeviceStatistics
Get-ActiveSyncMailboxPolicy
Get-AddressBookPolicy
Get-App
Get-AvailabilityAddressSpace
Get-CalendarNotification
Get-CalendarProcessing
Get-CASMailbox
Get-CASMailboxPlan
Get-Clutter
Get-Contact
Get-DataEncryptionPolicy
Get-DistributionGroup
Get-DistributionGroupMember
Get-DynamicDistributionGroup
Get-DynamicDistributionGroupMember
Get-ElevatedAccessApprovalPolicy
Get-ElevatedAccessRequest
Get-EligibleDistributionGroupForMigration
Get-EventsFromEmailConfiguration
Get-FocusedInbox
Get-Group
Get-GroupMailbox
Get-InboxRule
Get-LinkedUser
Get-LogonStatistics
Get-Mailbox
Get-MailboxAutoReplyConfiguration
Get-MailboxCalendarConfiguration
Get-MailboxCalendarFolder
Get-MailboxEnhancedRestoreBatch
Get-MailboxFolder
Get-MailboxFolderPermission
Get-MailboxFolderStatistics
...

To summarize the findings:

  • The REST API is still in beta.
  • The Exchange Online Management module downloads all Exchange Online REST CmdLets every time you connect (to reflect any changes in the REST API).

EXO V3 Drawbacks

There are several obvious drawbacks to how Microsoft has put together EXO V3.

Firstly, depending on your Internet connection, you may see poor performance from downloading the actual Exchange Online PowerShell module on every connection to Exchange Online.

Secondly, if you don’t explicitly disconnect from Exchange Online after each connection, the temp folders will build up on your disk.

Thirdly, third-party developers still can’t access the Exchange Online REST API directly since Microsoft may introduce breaking changes without warning.

EXO V3 — What We Hoped For

The EXO V3 module should have been self-contained with the ability to run REST CmdLets immediately after performing the OAuth2 authentication.

Unfortunately, someone decided to rush-release EXO V3 without waiting for the Exchange Online REST API to make it out of the beta stage.

Yes, you can now disable basic WinRM authentication, but you’re left with a silly PowerShell module that must self-update on every run.

To software developers providing clients with simplified Office 365 mailbox management, such as Easy365Manager, the EXO V3 release is nothing less than a huge disappointment.

Originally published at https://www.easy365manager.com on October 21, 2022.

--

--

No responses yet