Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Exporting Exchange configuration fails authentication, not able to get exception

Open adhodgson1 opened this issue 2 years ago • 2 comments

I'm trying to export Exchange configuration using an application with certificate on an Azure Devops build agent. Module version: 1.24.424.1 I've granted the application the Exchange.ManageAsApp API permission as well as the M365 Global Reader role. When I run the export command I get this output:

Exporting Microsoft 365 configuration for Components: EXOAcceptedDomain

Authentication methods specified:

  • Service Principal with Certificate Thumbprint

Connecting to {ExchangeOnline}...❌

I tried running the command in verbose mode but for this authentication stage its not giving me any more info. What are best things to look for so that I can best troubleshoot this issue?

adhodgson1 avatar May 21 '24 11:05 adhodgson1

First, are you able to authenticate using the app and the certificate (outside of Azure DevOps) ?

Kierow avatar May 21 '24 12:05 Kierow

Sorry for the noise, this turned out to be a firewall issue, the firewall was blocking access to Exchange Online via the IPS detection. Interestingly I didn't see the SSL errors until I ran the export using PowerShell 7.

adhodgson1 avatar May 22 '24 20:05 adhodgson1