Open adhodgson1 opened 8 months ago
Did you include the following steps in your pipeline:
Update-M365DSCDependencies
Uninstall-M365DSCOutdatedDependencies
This error looks like an issue with the preinstalled versions in the pipeline host.
Yes those commands are being issued on pipeline runs. The host we are using is a private ADO build agent. I actually resolved this by getting the team that runs these agents to recycle the agent after every run, so its something going on with the agent after an export. Still not sure what is causing it, seems also to be intermittent. Prefer recycled build agents anyway.
I'm having the exact same issue. Have you made any progress on this or you have stuck to recycling the agents? #4622
We’re recycling the agents. For us it was happening on an export, running the DSC resources didn’t seem to be a problem. I gave up trying to work out the cause.
@adhodgson1 Thanks for the response and, yeah, same issue here. I'm attempting to run an export job task in the same pipeline that I'm running the compliance check script from the whitepaper. I've discovered that running it in a completely separate pipeline works just fine, but I want this task to run after the compliance test fails. When you say that you are recycling agents, does that mean that you are destroying the VMs and creating new ones just for the one job or are you doing something different like agent maintenance?
Our agents are in a VMSS pool and the pool on the ADO end is set to recycle agents.
Been getting this same error using on-prem runners across several versions of the PS modules.
I'm doing lots of exports through Azure Devops pipeline runs and these fail intermittently with the above error. I can't work out what is going on, think it may be related to subsequent export runs on the same Windows build agent.
Module version: 1.24.313.1 Command: Export-M365DSCConfiguration -MaxProcesses 8 -Components AADAdministrativeUnit -Path Output/AAD -FileName AADAdministrativeUnit.ps1 -CertificateThumbprint $($certificate.Thumbprint) -TenantId $TenantName -ApplicationId $ApplicationID
Output: Exporting Microsoft 365 configuration for Components: AADAdministrativeUnit Authentication methods specified:
[error]The type initializer for 'Microsoft.Graph.PowerShell.Authentication.Common.ProtectedFileProvider' threw an exception.
I've tried running with verbose but it doesn't show anything extra in that stage.