EXOManagementRoleEntry: Exclude built in roles
Description of the issue
EXOManagementRoleEntry was originally added under PR4665 for the EXO workload.
We have been testing DSC on a rather vanilla tenant with no additional custom Exchange Roles. The capture includes 3152 role entries. Breaking them down the vast majority of these are type "cmdlet"
2748 x Type = cmdlet 384 x Type = WebService
Breaking this down into roles, these resources are all coming from built in exchange roles:
Count Name Group
----- ---- -----
274 UserApplication {UserApplication, UserApplication, UserApplication, UserApplication…}
260 Security_Admin {Security_Admin, Security_Admin, Security_Admin, Security_Admin…}
204 View-Only_Recipients {View-Only_Recipients, View-Only_Recipients, View-Only_Recipients, View-Only_Recipient…
201 View-Only_Configuration {View-Only_Configuration, View-Only_Configuration, View-Only_Configuration, View-Only_…
179 Mail_Recipients {Mail_Recipients, Mail_Recipients, Mail_Recipients, Mail_Recipients…}
169 O365SupportViewConfig {O365SupportViewConfig, O365SupportViewConfig, O365SupportViewConfig, O365SupportViewC…
158 Data_Loss_Prevention {Data_Loss_Prevention, Data_Loss_Prevention, Data_Loss_Prevention, Data_Loss_Preventio…
144 Transport_Hygiene {Transport_Hygiene, Transport_Hygiene, Transport_Hygiene, Transport_Hygiene…}
135 Security_Reader {Security_Reader, Security_Reader, Security_Reader, Security_Reader…}
102 MyBaseOptions {MyBaseOptions, MyBaseOptions, MyBaseOptions, MyBaseOptions…}
101 Organization_Configurati… {Organization_Configuration, Organization_Configuration, Organization_Configuration, O…
90 User_Options {User_Options, User_Options, User_Options, User_Options…}
84 Compliance_Admin {Compliance_Admin, Compliance_Admin, Compliance_Admin, Compliance_Admin…}
80 Role_Management {Role_Management, Role_Management, Role_Management, Role_Management…}
61 Mail_Recipient_Creation {Mail_Recipient_Creation, Mail_Recipient_Creation, Mail_Recipient_Creation, Mail_Recip…
61 Mailbox_Search {Mailbox_Search, Mailbox_Search, Mailbox_Search, Mailbox_Search…}
44 Retention_Management {Retention_Management, Retention_Management, Retention_Management, Retention_Managemen…
40 Migration {Migration, Migration, Migration, Migration…}
39 Distribution_Groups {Distribution_Groups, Distribution_Groups, Distribution_Groups, Distribution_Groups…}
37 Transport_Rules {Transport_Rules, Transport_Rules, Transport_Rules, Transport_Rules…}
What we are finding is that when trying to compile the MOF file our Azure Pipelines Agents are experiencing memory exhaustion. When we exclude this large component, the MOF compiles successfully.
Proposing that this capture should exclude built in identities to resolve this issue. Custom role entries should still be captured as this is what you'd want to restore in a deployment of your MOF.
Microsoft 365 DSC Version
2.26.1104.1
Which workloads are affected
Exchange Online
The DSC configuration
Export-M365DSCConfiguration `
-ApplicationId "$(appID)" `
-TenantId "$(tenantDomain)" `
-CertificateThumbprint "$(certificateThumbprint)" `
-Workloads @(
"EXO"
) `
-Mode Full `
-Validate `
-Path $snapshotPath `
-FileName "devTenantSnapshot-Batch3.ps1" `
-ConfigurationName "DevTenantSnapshot" `
-WithStatistics
Verbose logs showing the problem
VERBOSE: Loading module from path
'C:\Users\VssAdministrator\Documents\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1104.1\Classes\_Types08.psm1'.
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 3361.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 3249.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 3408.00 MB out of 8186.00 MB, CPU: Usage 53.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 3585.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 3800.00 MB out of 8186.00 MB, CPU: Usage 61.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 3993.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 4194.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 4411.00 MB out of 8186.00 MB, CPU: Usage 61.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 4592.00 MB out of 8186.00 MB, CPU: Usage 61.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 4829.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 5109.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 5313.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 5532.00 MB out of 8186.00 MB, CPU: Usage 62.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 5706.00 MB out of 8186.00 MB, CPU: Usage 51.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 5895.00 MB out of 8186.00 MB, CPU: Usage 61.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 6039.00 MB out of 8186.00 MB, CPU: Usage 62.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 6277.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 6513.00 MB out of 8186.00 MB, CPU: Usage 62.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 6899.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7132.00 MB out of 8186.00 MB, CPU: Usage 55.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7247.00 MB out of 8186.00 MB, CPU: Usage 62.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7503.00 MB out of 8186.00 MB, CPU: Usage 53.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7750.00 MB out of 8186.00 MB, CPU: Usage 82.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7622.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7735.00 MB out of 8186.00 MB, CPU: Usage 79.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7664.00 MB out of 8186.00 MB, CPU: Usage 80.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7662.00 MB out of 8186.00 MB, CPU: Usage 80.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7738.00 MB out of 8186.00 MB, CPU: Usage 82.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7864.00 MB out of 8186.00 MB, CPU: Usage 26.00%
##[warning]Free memory is lower than 5%; Currently used: 96.07%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7910.00 MB out of 8186.00 MB, CPU: Usage 80.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7952.00 MB out of 8186.00 MB, CPU: Usage 73.00%
##[debug]Agent environment resources - Disk: D:\ Available 74728.39 MB out of 76798.00 MB, Memory: Used 7983.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 73182.68 MB out of 76798.00 MB, Memory: Used 7963.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 73182.68 MB out of 76798.00 MB, Memory: Used 7808.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 73182.68 MB out of 76798.00 MB, Memory: Used 7661.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 73182.68 MB out of 76798.00 MB, Memory: Used 7486.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 73182.68 MB out of 76798.00 MB, Memory: Used 7281.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 73182.68 MB out of 76798.00 MB, Memory: Used 7214.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 73182.68 MB out of 76798.00 MB, Memory: Used 7180.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 73057.92 MB out of 76798.00 MB, Memory: Used 7170.00 MB out of 8186.00 MB, CPU: Usage 100.00%
##[debug]Agent environment resources - Disk: D:\ Available 72673.92 MB out of 76798.00 MB, Memory: Used 6851.00 MB out of 8186.00 MB, CPU: Usage 89.00%
##[debug]Agent environment resources - Disk: D:\ Available 72673.92 MB out of 76798.00 MB, Memory: Used 6669.00 MB out of 8186.00 MB, CPU: Usage 98.00%
##[debug]Agent environment resources - Disk: D:\ Available 72673.92 MB out of 76798.00 MB, Memory: Used 6716.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 72673.92 MB out of 76798.00 MB, Memory: Used 6896.00 MB out of 8186.00 MB, CPU: Usage 61.00%
##[debug]Agent environment resources - Disk: D:\ Available 72545.92 MB out of 76798.00 MB, Memory: Used 7028.00 MB out of 8186.00 MB, CPU: Usage 53.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 7139.00 MB out of 8186.00 MB, CPU: Usage 56.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 7206.00 MB out of 8186.00 MB, CPU: Usage 61.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 7254.00 MB out of 8186.00 MB, CPU: Usage 72.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 7225.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 7324.00 MB out of 8186.00 MB, CPU: Usage 84.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 7502.00 MB out of 8186.00 MB, CPU: Usage 54.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 7657.00 MB out of 8186.00 MB, CPU: Usage 57.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 7870.00 MB out of 8186.00 MB, CPU: Usage 63.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 7891.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 8001.00 MB out of 8186.00 MB, CPU: Usage 66.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 8047.00 MB out of 8186.00 MB, CPU: Usage 56.00%
##[debug]Agent environment resources - Disk: D:\ Available 70401.92 MB out of 76798.00 MB, Memory: Used 8059.00 MB out of 8186.00 MB, CPU: Usage 54.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8077.00 MB out of 8186.00 MB, CPU: Usage 62.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8112.00 MB out of 8186.00 MB, CPU: Usage 61.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8025.00 MB out of 8186.00 MB, CPU: Usage 52.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8085.00 MB out of 8186.00 MB, CPU: Usage 53.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8108.00 MB out of 8186.00 MB, CPU: Usage 54.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8111.00 MB out of 8186.00 MB, CPU: Usage 58.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8099.00 MB out of 8186.00 MB, CPU: Usage 62.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8097.00 MB out of 8186.00 MB, CPU: Usage 63.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8110.00 MB out of 8186.00 MB, CPU: Usage 53.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8095.00 MB out of 8186.00 MB, CPU: Usage 67.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8091.00 MB out of 8186.00 MB, CPU: Usage 65.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8108.00 MB out of 8186.00 MB, CPU: Usage 60.00%
##[debug]Agent environment resources - Disk: D:\ Available 67048.65 MB out of 76798.00 MB, Memory: Used 8118.00 MB out of 8186.00 MB, CPU: Usage 58.00%
Environment Information + PowerShell Version
Thank you for the suggestion. We'll take a look at it and how the role entries work together. However, because this will change the exported resources from a tenant against an already existing baseline, it would flag false drifts. I'll get back to you.