-
Notifications
You must be signed in to change notification settings - Fork 610
Description
Hello Everyone!
I’m trying to run M365 DSC in a Linux Docker container and, surprisingly, I’ve managed to get most of it working so far. However, I’m running into an issue with the Exchange Online connection.
Does anyone have any suggestions on how to fix or work around this?
I can’t connect using the certificate thumbprint, because it looks for the certificate in the Windows Cert store, which isn’t available on Linux. Everything works fine when using CertificatePath and Password, except for ExchangeOnline — even though according to the documentation, it should be supported through DSC as well.
Export-M365DSCConfiguration -Components @("O365OrgSettings") -ApplicationId $ApplicationId
-CertificatePath $CertPath -CertificatePassword $Cred
-ApplicationSecret $ApplicationSecret -TenantId $TenantId
-Path $outputPath
This is the error that I am getting:
Exporting Microsoft 365 configuration for Components: O365OrgSettings
Authentication methods specified:
- Service Principal with Certificate Path
- Service Principal with Application Secret
Connecting to {ExchangeOnline}...❌
Exception: /ConfigCobraAssessment/Modules/MSCloudLoginAssistant/1.1.52/Workloads/ExchangeOnline.ps1:290
Line |
290 | throw 'No valid authentication type found'
| ~~~~~~~~~
I can connect to Exchange manually without any issues using this direct command:
Connect-ExchangeOnline -AppId $ApplicationId -CertificateFilePath $CertPath -CertificatePassword $CertSecurePassword -Organization "example.onmicrosoft.com"
Does anyone have any ideas or suggestions on how to make this work?
Thank you!