Skip to content
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

EXOAvailabilityConfig component script - unhandled error when OrgWideAccount is empty #3402

Closed
PierreColyn opened this issue Jun 21, 2023 · 1 comment · Fixed by #3415 or #3430
Closed
Assignees
Labels
Bug Something isn't working Exchange Online

Comments

@PierreColyn
Copy link

When I try to run the EXOAvailabilityConfig component with a certificate thumbprint I get the following error in the error log:

{InvalidOperation}
System.Management.Automation.RuntimeException: You cannot call a method on a null-valued expression.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
"Error during Export:"
at Export-TargetResource, C:\Users#Username#\Documents\WindowsPowerShell\Modules\Microsoft365DSC\1.23.614.1\DSCResources\MSFT_EXOAvailabilityConfig\MSFT_EXOAvailabilityConfig.psm1: line 351
at Start-M365DSCConfigurationExtract, C:\Users#Username#\Documents\WindowsPowerShell\Modules\Microsoft365DSC\1.23.614.1\modules\M365DSCReverse.psm1: line 619
at Export-M365DSCConfiguration, C:\Users#Username#\Documents\WindowsPowerShell\Modules\Microsoft365DSC\1.23.614.1\modules\M365DSCUtil.psm1: line 1308
at , : line 1
TenantId: #Tenant ID#

This is due to the OrgWideAccount not been set in the selected environment.

Please add error handling to check if the OrgWideAccount is empty (line 352 of script).

@andikrueger andikrueger added Bug Something isn't working Exchange Online labels Jun 21, 2023
@andikrueger
Copy link
Collaborator

Thanks for reporting! We'll look into it.

NikCharlebois added a commit to NikCharlebois/Microsoft365DSC that referenced this issue Jun 23, 2023
@NikCharlebois NikCharlebois self-assigned this Jun 23, 2023
NikCharlebois added a commit to NikCharlebois/Microsoft365DSC that referenced this issue Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Exchange Online
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants