I have an issue using Connect-IPPSession cmdlet to connect to O365 Security & Compliance on Linux Powershell.
My server is behind a proxy, and I got this error message when running
*PS /root> $delegated_cred = New-Object System.Management.Automation.PSCredential ("$username", $secPassword)*
*PS /root> Connect-IPPSSession -Credential $delegated_cred*
**Connecting to remote server aus01b.ps.compliance.protection.outlook.com failed with the following error message : MI_RESULT_FAILED For more information, see the about_Remote_Troubleshooting Help** **topic**
The issue does not happen if running on a server with direct internet connectivity.
When we did packet capture to analyze when running the Connect-IPPSession cmdlet, the 3 URLs (https://login.microsoftonline.com, https://ps.compliance.protection.outlook.com, https://dc.services.visualstudio.com) were sent to Proxy correctly.
However, when it came to connecting to https://aus01b.ps.compliance.protection.outlook.com, it connected directly to the Microsoft server without going to proxy. That caused the connection issue. I wonder if this is a bug or any newer library to support?
Here are what I am using, also tried PS 7.2 and EXO 3.1, 3.0, 2.0.6 prerelease, same issue.
PS /root> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.2
PSEdition Core
GitCommitId 7.3.2
OS Linux 4.18.0-372.32.1.el8_6.x86_64 #1 SMP Fri Oct 7 12:35:10 EDT 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS /root> Get-InstalledModule
Version Name Repository Description
------- ---- ---------- -----------
3.1.0 ExchangeOnlineManagement PSGallery This is a General Availability (GA) release of the Exchange Online Powershell V3 module. Exchange Online cmdlets in this module ar…
2.3.1 PSWSMan PSGallery Module to install and manage the forked WSMan client libraries for Linux and macOS.…