EXOMailboxPermission: System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'AccessRights'. The argument "SendAs" does not belong to the set "ChangeOwner,ChangePermission,DeleteItem,ExternalAccount,FullAccess,ReadPermission" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. ---> System.Management.Automation.ValidationMetadataException: The argument "SendAs" does not belong to the set "ChangeOwner,ChangePermission,DeleteItem,ExternalAccount,FullAccess,ReadPermission" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. #3942
Labels
Description of the issue
I have already ran:
Update-M365DSCAllowedGraphScopes -All -Type Read
Command:
Export-M365DSCConfiguration -Components @("EXOMailboxPermission") -Credential $Credential -Path $FilePath -FileName $FileName
Stack Trace:
[2023/11/22 03:29:39]
{InvalidData}
System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'AccessRights'. The argument "SendAs" does not belong to the set "ChangeOwner,ChangePermission,DeleteItem,ExternalAccount,FullAccess,ReadPermission" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. ---> System.Management.Automation.ValidationMetadataException: The argument "SendAs" does not belong to the set "ChangeOwner,ChangePermission,DeleteItem,ExternalAccount,FullAccess,ReadPermission" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
at System.Management.Automation.ValidateSetAttribute.ValidateElement(Object element)
at System.Management.Automation.ValidateEnumeratedArgumentsAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics)
at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
--- End of inner exception stack trace ---
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:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.1115.1\DSCResources\MSFT_EXOMailboxPermission\MSFT_EXOMailboxPermission.psm1: line 440
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.1115.1\modules\M365DSCReverse.psm1: line 615
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.1115.1\modules\M365DSCUtil.psm1: line 1320
at , C:\Scripts<<>>\Office365_Backup_Debug.ps1: line 1730
<<>>@<<>>.onmicrosoft.com
TenantId: <<>>.onmicrosoft.com
PS Output:
Transcript started, output file is C:\temp<<>>\debug\log\EXOMailboxPermission.txt
Exporting Microsoft 365 configuration for Components: EXOMailboxPermission
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}...✅
[1/1] Extracting [EXOMailboxPermission] using {Credentials}...
|---[1/4114] <<>>@<<>>.com
|---[1/4] <<name 1>>✅
|---[2/4] <<name 1>>✅
|---[3/4] <<name 1>>✅
|---[4/4] <<name 1>>✅
|---[2/4114] <<>>@<<>>.com
|---[1/2] <<<name 2>>>✅
|---[2/2] <<<name 2>>>✅
|---[3/4114] <<>>@<<>>.com
|---[1/5] <<<name 3>>>❌
Error Log created at {file://C:/temp/<<>>/debug/cwd/5112-M365DSC-ErrorLog.log}
⌛ Export took {270 seconds}
Transcript stopped, output file is C:\temp<<>>\debug\log\EXOMailboxPermission.txt
Microsoft 365 DSC Version
1.23.1115.1
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: