The Az.RecoveryServices powershell command Get-AzRecoveryServicesVault throws "Could not load file or assembly Microsoft.Azure.PowerShell.Authentication or one of its dependencies. The system cannot find the file specified" in the devops release pipeline. The command is executed in the Azure powershell task version 4.* in the pipeline. The difference I see with the last successful run is the version of Az.Accounts.
Import-Module -Name C:\Modules\az_3.8.0\Az.Accounts\1.8.1\Az.Accounts.psd1 -Global
During the successful run the Azure powershell task imported version 1.8.0.
Import-Module -Name C:\Modules\az_3.8.0\Az.Accounts\1.8.0\Az.Accounts.psd1 -Global