-
Notifications
You must be signed in to change notification settings - Fork 497
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
EXOCASMailboxSettings: restore failed after user is deleted #3215
Comments
M365DSC has the challenge to not be able to create the needed mailbox for this mailbox setting within the same resource. The current outcome is expected and the desired behavior. As long as the mailbox is not there, no setting can be applied to it. Do you also have the users in the same configuration? If yes, then you can add the DependsOn Parameter within the configuration to point to the Mailbox. MailboxSetting ABC
{
DependsOn = MailBox ABC
} |
As @andikrueger mentions above, the EXOCASMailboxSettings resource has an "assumed dependency" on the user existing in the tenant. To ensure it does, you will need to include an AADUser item in your config and make sure it gets executed first, either by having it before the EXOCASMailboxSettings resource in the config or by using the DependsOn parameter as mentioned above. Thanks |
I see, hadn't seen that feature. Would it be possible/make sense if the extraction itself populated dependencies? |
Please check out #597 about this feature |
Ah! One step ahead already 😅 Thank you! |
Details of the scenario you tried and the problem that is occurring
I exported a snapshot of a development sandbox tenant (https://developer.microsoft.com/en-us/microsoft-365/dev-program) populated with the default sample data.
Then I removed a few users and ran a restore of the full captured snapshot. The resource
EXOCAMailboxSettings
failed for all of the removed users.Verbose logs showing the problem
M365TenantConfig at line 9836:
Suggested solution to the issue
Ensure order so the user is restored before, if possible.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Using Windows Server Core container,
mcr.microsoft.com/windows/servercore:1809-amd64
.The operating system the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
The text was updated successfully, but these errors were encountered: