-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export-M365DSCConfiguration: Workload EXO - Organization cannot be null #5823
Comments
@Franky709 Can you please provide the command line you used when exporting? For example, using app registration with a client certificate, the following works for me: $clientId = "XXX"
$tenantIdName = "xxx.onmicrosoft.com"
$certThumbPrintEXO = "XXX"
Export-M365DSCConfiguration -Components @("EXOAddressList") -Path D:\testbed -ApplicationId $clientId -TenantId $tenantIdName -CertificateThumbprint $certThumbprintEXO -Verbose Did you specify |
I've tried with AppReg (certificate + thumbprint) AND Managed Identity. Export-M365DSCConfiguration -Components @("$comp") -ManagedIdentity -TenantId $tenantName -Path $exportPath -Verbose; Export-M365DSCConfiguration -Components @("$comp") -TenantId $tenantName -ApplicationId $appId -CertificateThumbprint $thumbprint -Path $exportPath -Verbose; |
I'm using PS5.1, but it also works on PS 7.4.6 for me as well. No issues there. Can you please add the |
In the linked .txt file is the transscript with verbose for the component: EXOAcceptedDomain, as an example |
Okay, so I just executed the same command as you with What's the transcript for certificate exports? Is the certificate you're using one with SHA1 or SHA256? I had to switch to SHA1 for it to work when generating, otherwise I'd get an exception during connect. |
Description of the issue
When i try to do an Export-M365DSCConfiguration for the workload of EXO (ExchangeOnline), I get the following error for all components. I tried it with PS5.1 and PS7... with managed identities AND app registration
[2025-02-21 11:25:03] [INFO] ------------------------------[1/101 - Export EXOAcceptedDomain]------------------------------
[2025-02-21 11:25:03] [INFO] Trying to pull EXOAcceptedDomain.
Exporting Microsoft 365 configuration for Components: EXOAcceptedDomain
There is a newer version of the 'Microsoft365DSC' module available on the gallery.
To update the module and it's dependencies, run the following command:
Update-M365DSCModule
Authentication methods specified:
Connecting to {ExchangeOnline}...❌
Partial Export file was saved at: C:\Users\ADMIN~4.VAN\AppData\Local\Temp\18\a43126b2-fb40-4389-8c1c-66a9adc5b61c.partial.ps1
[2025-02-21 11:25:08] [WARN] Exception occured.
[2025-02-21 11:25:08] [ERROR] Value cannot be null.
Parameter name: Organization cannot be null for Managed Identity based connections.
Transcript:
[2025-02-21 11:25:03] [INFO] ------------------------------[1/101 - Export EXOAcceptedDomain]------------------------------
[2025-02-21 11:25:03] [INFO] Trying to pull EXOAcceptedDomain.
PS>TerminatingError(Disconnect-MgGraph): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: No application to sign out from."
Exporting Microsoft 365 configuration for Components: EXOAcceptedDomain
There is a newer version of the 'Microsoft365DSC' module available on the gallery.
To update the module and it's dependencies, run the following command:
Update-M365DSCModule
Authentication methods specified:
Connecting to {ExchangeOnline}...
INFO: Disconnected successfully !
PS>TerminatingError(Get-ConnectionContext): "Value cannot be null.
Parameter name: Organization cannot be null for Managed Identity based connections."
PS>TerminatingError(): "Value cannot be null.
Parameter name: Organization cannot be null for Managed Identity based connections."
Microsoft 365 DSC Version
1.25.212.2
Which workloads are affected
Exchange Online
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: