ariste.info
  • MSDyn365 & Azure DevOps ALM
  • Get my book!
  • ISV License Generator
  • About me
    • About me
    • Subscribe
    • Contact
  • Logo
  • LinkedIn

Unified experience ALM

  • Welcome to the new ALM guide
    • Introduction
    • Prerequisites
  • Create and prepare Azure DevOps organization and project
    • Create an Azure DevOps organization
    • Create an Azure DevOps project
    • Enable TFVC projects in Azure DevOps
    • Add CI/CD agents with an Azure subscription
  • Unified development environment
    • What are unified developer environments?
    • Transition to a capacity-based model
    • Deploying a unified developer environment using PowerShell
    • Deploy an UDE environment from PPAC
    • Upgrade version in a Unified Development Environment
    • Useful links
  • Using Visual Studio
    • Connect Visual Studio to your UDE
    • Deploy code to a Unified Development Environment
  • Pipelines
    • What’s new in the pipelines?

Legacy Guide

  • Welcome
    • Welcome!
  • Dynamics 365 for Finance & Operations & Azure DevOps
    • Intro
    • Package and model planning
    • Azure DevOps
    • First steps
    • The build server
    • Visual Studio
    • Some advice
    • Branching strategies
  • Azure Pipelines
    • Builds
    • Continuous integration
    • Gated check-ins
    • Set up the new Azure DevOps tasks for Packaging and Model Versioning
  • Azure hosted build for Dynamics 365 Finance & SCM
    • Intro
    • Azure agents
    • How does it work?
    • What do I need?
    • Azure DevOps artifacts
    • Prepare Azure DevOps
    • Configure pipeline
    • Update for version 10.0.18 and greater
  • Azure DevTest Labs powered builds
    • Intro
    • Azure DevTest Labs
    • Getting and preparing the VHD
    • Create a DevTest Labs account
    • Creating the VM
    • Preparing the VM
    • Create a new image
    • Azure DevOps pipelines
    • Run the build
    • Times
    • Show me the money
    • Some final remarks
  • Add and build .NET projects
    • Intro
    • Build .NET in your pipeline
    • Add a C# project to FnO
    • Build pipelinebui
    • Things I don’t like/understand/need to investigate
  • Release Pipelines
    • Intro
    • Setting up Release Pipeline in Azure DevOps for Dynamics 365 for Finance and Operations
    • AAD app creation
    • Create the release pipeline in DevOps
    • Creating the LCS connection
    • New Azure DevOps release tasks: MSAL authentication and ADAL deprecation
  • Automation
    • Update VMs using pipelines and d365fo.tools
    • Builds
    • Releases
    • But I like to add some human touch to it
    • Extra bonus
    • Update a variable in a release
  • LCS DB API
    • Call the LCS Database Movement API from your Azure DevOps Pipelines
    • Automating Prod to Dev DB copies
    • Restore a data package with Azure DevOps Pipelines
  • Secure your Azure Pipelines with Azure Key Vault
    • Azure Key Vault
    • Securing your Azure DevOps Pipelines
View Categories
  • ariste.info
  • Dynamics 365 F&O Dev ALM guide
  • Legacy Guide
  • Release Pipelines
  • New Azure DevOps release tasks: MSAL authentication and ADAL deprecation

New Azure DevOps release tasks: MSAL authentication and ADAL deprecation

There’s a new version and a new task for our release pipelines that use the Azure-hosted agents. These changes have been introduced recently to support the new MSAL authentication libraries for the LCS service connection used to upload and deploy the deployable packages. The current service connections use Azure Active Directory (Azure AD) Authentication Library (ADAL), and support for ADAL will end in June 2022. This means that if we don’t update the Asset Upload and Asset Deployment to their new versions (1.* and 2.* respectively) the release pipelines could stop working after 30th June 2022. I’d like to thank Joris de Gruyter for the tip, otherwise I couldn’t have written this post 😛

New MSAL task #

If you don’t add this task to your pipeline, you’ll get the error: [error]The specified module ‘MSAL.PS’ was not loaded because no valid module file was found in any module directory. There’s also a new task to add the support for MSAL authentication. This task will install the MSAL PowerShell libraries in your Microsoft-hosted agent, and you need to add it before any other task authenticates. Like this:
MSAL install task
MSAL install task
The task has no parameters or options that need to be filled, just add it to your release pipeline, and you’re done. If you’ve got a multi-stage release pipeline, you have to add this new task to each stage where there’s an authentication step. For example, if you have a first stage that uploads the DP to LCS, and then another one that deploys it and doesn’t have the task, it will fail. This is at least true in projects with additional agents, I need to try it with a single agent project.

New Asset Upload and Deploy versions #

To support the new MSAL authentication, the dev tools team at Microsoft have published new versions of both tasks.
Asset Upload #
If you change the version of the Asset Upload task from 0.* to 1.* you’ll see no changes. The fields in the task are the same, but it will use MSAL as the new authentication method. But wait, just changing the version won’t be enough, you need to create a new service connection to LCS because the authentication endpoint has changed to https://login.microsoftonline.com/organizations. This endpoint will be the one used, from now on, in all versions, the old ones and the new. Here you can see the old service connection endpoint:
Old service connection
Old service connection
And the new one:
New service connection
New service connection
Caution! If you’re using any of the LCS geos, like Europe, Norway, South Africa, etc. the endpoints need to reflect that as described in the table:
Geography Lifecycle Services portal Lifecycle Services API endpoint Environment URL
United States https://lcs.dynamics.com/ https://lcsapi.lcs.dynamics.com https://NAME.operations.dynamics.com/
Europe https://eu.lcs.dynamics.com/ https://lcsapi.eu.lcs.dynamics.com https://NAME.operations.eu.dynamics.com/
France https://fr.lcs.dynamics.com/ https://lcsapi.fr.lcs.dynamics.com https://NAME.operations.fr.dynamics.com/
Norway https://no.lcs.dynamics.com/ https://lcsapi.no.lcs.dynamics.com https://NAME.operations.no.dynamics.com/
South Africa https://sa.lcs.dynamics.com/ https://lcsapi.sa.lcs.dynamics.com https://NAME.operations.sa.dynamics.com/
Switzerland https://ch.lcs.dynamics.com/ https://lcsapi.ch.lcs.dynamics.com https://NAME.operations.ch.dynamics.com/
United Arab Emirates https://uae.lcs.dynamics.com/ https://lcsapi.uae.lcs.dynamics.com https://NAME.operations.uae.dynamics.com/
Asset Deployment #
In the Asset Deployment task we now see three versions: 0.* which was the original one, 1.* which is the one that enabled support for self-service environments, and 2.* which is the new task that supports MSAL authentication. If you’ve already created the service connection in the previous step, just change it to use the new one.

And what about self-hosted agents (build VM)? #

I’m not sure. But probably just installing the MSAL.PS PowerShell library in your build VM will be enough, if it’s not there already.

Latest MSAL.PS task version 1.0.1572609 (January 2024) #

If you’re getting an error in the Asset Upload task: “The underlying connection was closed: An unexpected error occurred on a receive.”, make sure to update your pipeline agent specification to windows-2022:New Azure DevOps release tasks: MSAL authentication and ADAL deprecationThis will fix the issue!

Subscribe! #

Receive an email when a new post is published
What are your Feelings
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can I help?

How can I help?

Creating the LCS connection

6 Comments

  1. Søren Printz Christensen 2 years ago Reply

    Hi
    We are getting “Error creating new file asset: ‘You don’t have the required permissions to perform this operation.'”
    We are using a EU LCS project could that be the problem?
    We have also with MSAL.

    Søren PC

    • Adrià Ariste Santacreu Post Author 2 years ago Reply

      Has the user which is used in the service connection logged into LCS? Sometimes that’s an issue. Another one could be not having the right role in LCS.

      And I also know that for the past days there are issues with LCS, with failing pipelines.

      • Søren Printz Christensen 2 years ago Reply

        Yes logged in and is Project owner.
        A Microsoft case is opened awaiting responds.
        PS: Can the EU geo be related?

        • Adrià Ariste Santacreu Post Author 2 years ago Reply

          I wouldn’t be surprised it’s an LCS issue regardless of the region.

  2. Peter 2 years ago Reply

    Hi Adria
    IM also getting the same error trying to upload package to LCS. Customer also using Europe LCS.

    [error]Error creating new file asset: ‘You don’t have the required permissions to perform this operation.’

    Regards
    Peter

    • Adrià Ariste Santacreu Post Author 2 years ago Reply

      Hi Peter,

      If you’re using any of the LCS’ geos you need to use the right LCS API Endpoint in the service connection, and also the LCS url. I will update the document and post, because I thought I already had, oops.

Write A Comment Cancel Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Table of Contents
  • New MSAL task
  • New Asset Upload and Deploy versions
    • Asset Upload
    • Asset Deployment
  • And what about self-hosted agents (build VM)?
  • Latest MSAL.PS task version 1.0.1572609 (January 2024)
  • Dynamics 365 Community
  • Subscribe!
  • Microsoft MVP
  • LinkedIn
  • Privacy Policy
  • Contact
  • About me

© 2024 ariste.info. Designed by CazaPelusas.

Top

    Type above and press Enter to search. Press Esc to cancel.