Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

DevOps pipeline failure. AzureRM not loaded

(6) ShareShare
ReportReport
Posted on by 119
Good morning all,
 
We're using DevOps pipelines to upload our Dynamics customizations to LCS, and trigger the release to our Dynamics sandbox environments. However, since last week we are getting intermittent errors "The specified module 'AzureRM' was not loaded because no valid module file was found in any module directory". Sometimes this error occurs in the first step of our pipeline (the package upload to LCS), sometimes it happens in the second step (triggering the release to the sandbox environment in LCS) and sometimes the error doesn't occur at all and the release happens normally.
 
The release pipeline itself hasn't changed over 2 years. Does anyone have an idea why this is happening and what we can do to make our releases run smoothly again?
 
2025-03-10T07:14:54.3408729Z ##[section]Starting: Upload XXX to project XXX
2025-03-10T07:14:54.3414396Z ==============================================================================
2025-03-10T07:14:54.3414573Z Task         : Dynamics Lifecycle Services (LCS) Asset Upload
2025-03-10T07:14:54.3414686Z Description  : Task to upload assets to the LCS asset library
2025-03-10T07:14:54.3414807Z Version      : 1.0.1791712
2025-03-10T07:14:54.3414921Z Author       : Microsoft Corporation
2025-03-10T07:14:54.3415021Z Help         : Review the Dynamics 365 for Finance and Operations [Developer Documentation](https://go.microsoft.com/fwlink/?linkid=2141947).
2025-03-10T07:14:54.3415221Z ==============================================================================
2025-03-10T07:14:55.5245809Z ##[error]The specified module 'AzureRM' was not loaded because no valid module file was found in any module directory.
2025-03-10T07:14:55.5466437Z ##[section]Finishing: Upload XXX to project XXX
 
Categories:
  • MK-11031356-0 Profile Picture
    18 on at
    DevOps pipeline failure. AzureRM not loaded
    @FV@E Thanks! Sorry, it was early in the morning and I didn't read the comment thoroughly. You're both right, the endpoint is the issue. Updating it has fixed the issue on one pipeline. The other pipeline only our client can update the service connection, so we have forwarded the instructions.
     
    Thank you both for your help on this issue.
  • FV@E Profile Picture
    119 on at
    DevOps pipeline failure. AzureRM not loaded
    @MK-11031356-0 I didn't have to make changes to the authentication myself. But as far as I understand it, you might need to update the authentication endpoint in your connection to LCS (Service connections in DevOps)
  • MK-11031356-0 Profile Picture
    18 on at
    DevOps pipeline failure. AzureRM not loaded
    Two of our ADO pipelines are failing like this. I am trying to fix one of them, and followed the advice posted here - I changed the task to v2 and changed the runner to be windows-2022. Now I get an OAuth error.

    @Mohamed Amine Mahmoudi what auth changes did you make? Can you provide more insight? I really need this, because so far this thread is the only relevant result to come up for this issue.
  • FV@E Profile Picture
    119 on at
    DevOps pipeline failure. AzureRM not loaded
    Some more background for others who read this topic:
     
    The reason that our pipeline failed only randomly and not all the time seems to be that when using the image "windows-latest" some runs used the old 20250224.5.0 image version, and some used the new 20250303.1.0 version. Apparently new versions are not automatically used in every pipeline run.
  • FV@E Profile Picture
    119 on at
    DevOps pipeline failure. AzureRM not loaded
    @Mohamed Amine Mahmoudi Thank you for your detailed answer. It seems that upgrading the DevOps task from v1 to v2 has indeed solved the issue. Thanks a lot!
  • Verified answer
    Mohamed Amine Mahmoudi Profile Picture
    23,368 Super User 2025 Season 1 on at
    DevOps pipeline failure. AzureRM not loaded
    Hi,

    We are also facing issues. In our case, these issues arise because the latest Azure Pipelines agent images with version number 20250303.1.0 no longer include the AzureRM PowerShell module. Currently, this only occurs when the "windows-latest" agent image is used. If "windows-2022" is specified, it still uses the previous version (which for us is 20250224.5.0). This version still includes AzureRM, and the LCS upload works as expected.

    However, I expect "windows-2022" will eventually adopt version 20250303.1.0 as well, so this is not a long-term solution.

    What works for us is upgrading the task version. For the LCS upload task, version 2 has no dependency on AzureRM and works with "windows-latest".

    To make this work, I also had to change the authentication endpoint setting in the LCS service connection to https://login.microsoftonline.com/organizations
     
    Here is a link for windows-2022 with the information about the removal of AzureRM in the latest agent image version: https://github.com/actions/runner-images/releases/tag/win22%2F20250303.1
     
    Best regards,
    Mohamed Amine MAHMOUDI

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 501 Most Valuable Professional

#2
Saalim Ansari Profile Picture

Saalim Ansari 315

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 310

Overall leaderboard

Product updates

Dynamics 365 release plans