Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Conflict Between Update-M365DSCModule and Az.Accounts Module Versions

Open Jens1986-11 opened this issue 6 months ago • 1 comments

I’ve encountered an issue where running the Update-M365DSCModule command uninstalls any version of the Az.Accounts module higher than 3.0.2.

For me this is problematic because the server in question is used as an agent for Azure DevOps pipelines, and some of the systems we deploy require the Az.KeyVault module, which depends on a newer version of Az.Accounts.

Currently, I’ve worked around this by installing both versions of Az.Accounts side-by-side, which allows everything to function. However, running Update-M365DSCModule removes the newer version, breaking compatibility with Az.KeyVault.

Is there a reason that the New version of Az.Accounts is not used?

Thanks.

Jens1986-11 avatar Jun 11 '25 07:06 Jens1986-11

Duplicates #5920

Borgquite avatar Jun 11 '25 14:06 Borgquite

Microsoft365DSC now has a way to skip uninstallation of other modules using Update-M365DSCModule -NoUninstall. This will update the module itself and leave all of the other modules installed (meaning no changes to higher versions). Newer module versions required by M365DSC will of course still be installed. Module versions are also directly imported using the version required by M365DSC.

FabienTschanz avatar Jul 04 '25 13:07 FabienTschanz