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
IDX12729: Unable to decode the header '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]' as Base64Url encoded string.
Downgrading to EXO module 3.4.0 solved the problem, and I can use the Azure and EXO connections simultaneously. This is on Windows 10 with, and PowerShell 5.1.19041.4894
I'd be happy to know if there is any change in the future regarding the conflicting .Nets.
- Sep 28, 2024https://blog.icewolf.ch/archive/2024/09/26/exchangeonlinemanagement-3-6-0-released/ , the new version of the module fixed the issue
- TValentaSep 30, 2024Copper Contributor
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.- Magnus_JakobsenNov 15, 2024Copper Contributor
I ended up getting the same issue with 3.6.0. Same unspecific error as well.
Luckily 3.4.0 still works!