-
Notifications
You must be signed in to change notification settings - Fork 440
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
The type initializer for 'Microsoft.Graph.PowerShell.Authentication.Common.ProtectedFileProvider' threw an exception. #4491
Comments
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.
|
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:
Partial Export file was saved at: C:\Users\AzDevOps\AppData\Local\Temp\5802d33c-e961-486f-a9d1-9dda01982199.partial.ps1
##[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.
The text was updated successfully, but these errors were encountered: