Forum Discussion
Exchange online and MGGraph are interfering
- Jul 30, 2024
The issue is that ExchangeOnlineManagement 3.5.1 uses version 8.0.23.53103 of System.Text.Json.dll where 3.4.x doesn't use System.Text.Json.dll at all, hence there's no conflict with version 6.0.21.52210 used by the Microsoft.Graph.Authentication module.
Cheers,
Lain
Thank you Harm, I noticed this version, and my quick testing shows improvement:
* Connect-ExchangeOnline works with interactive login, managed identity, and a certificate (App Registration).
* With all login methods above, I can also do AzConnect and MgConnect with a Managed Identity or a certificate (App Registration).
* Sadly, connecting to IPPSSession is only possible with a Personal Account (interactively). Managed Identity was never supported to Purview (and probably never will be), and App Registration with certificate now produces a very unspecific error:
---
An error has occurred.
At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.6.0\netFramework\ExchangeOnlineManagement.psm1:766 char:21
+ throw $_.Exception;
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], SystemException
+ FullyQualifiedErrorId : An error has occurred.
---
Just trying to connect to IPPSSession will load some assemblies, which will cause Connect-MgGraph to throw the following error: Connect-MgGraph: Invalid JWT access token.
This won't happen when connecting to IPPSSession with a Personal Account (interactively).
Sadly, I need to connect to Purview with App Registration while simultaneously connecting to Azure and MgGraph. This is a pretty wild combination, but the client project requires it.
After all, I will have to stick with 3.4.0, but thanks for the update.