Skip to content

Problem with Exchange connection on linux #6678

@gaborenok

Description

@gaborenok

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!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions