Editar

Compartir a través de


Update LCS Connection authentication tasks to MSAL in Azure Pipelines

By default, new versions of the Microsoft Azure DevOps tasks for Dynamics 365 support the Microsoft Authentication Library (MSAL) and use it by default for authentication. To support these new versions, the MSAL PowerShell libraries (MSAL.PS) must be installed on any agent that runs the tasks. For self-hosted agents, the MSAL.PS library can be manually installed from the PowerShell Gallery. For any agent, including agents that are hosted in Azure DevOps, Microsoft provides a task that installs the MSAL.PS library for you every time that the pipeline is run.

Update existing service connections

For existing service connections, the Authentication Endpoint setting must be updated to https://login.microsoftonline.com/organizations. If you're using a national cloud, see National clouds to find your relevant endpoint. The correct authentication endpoint will be set by default when you create a new service connection. The setting must be updated only for national clouds.

For more information about how to set up a connection, see Create an LCS connection in Azure Pipelines.

Add the MSAL.PS install task to a pipeline

To add the MSAL.PS install task to the build of your YML or Classic pipeline, search the task list for Install MSAL.PS to enable authentication. There are no options or settings for this task. Make sure that this install task is run on every agent before you run any task that requires authentication with Microsoft Dynamics Lifecycle Services (LCS),

Note

The MSAL.PS libraries must be installed on every agent that runs tasks that require authentication with LCS. If your pipeline consists of multiple stages, each stage might be run on a different agent. Therefore, each stage must ensure that the libraries are installed.

Update existing tasks

To update the existing tasks so that they use the new MSAL authentication, you must update the task versions. For more information about how to update task versions, see Task types & usage. The following table shows the tasks that use authentication. It also shows the earliest version of each task that uses MSAL.

Task name Minimum version that uses MSAL
Dynamics Lifecycle Services (LCS) Asset Download 1.* or later
Dynamics Lifecycle Services (LCS) Asset Upload 1.* or later
Dynamics Lifecycle Services (LCS) Asset Deployment 2.* or later