6
votes

I'm trying to create my first release pipeline, however I keep getting this error:

Exception Message: The pipeline is not valid. Job Phase_1: Step AzureResourceGroupDeployment input ConnectedServiceName references service connection which could not be found. The service connection does not exist or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz. (type PipelineValidationException)

I've tried to follow the instructions in the link, however the "Authorize Resources" button does not exist.

"Allow all pipelines to use this service connection" is already enabled and I have recreated the deployment task after enabling this.

How do I authorise the resource?

3
What about re-create the YAML or create the release with classic editor?Merlin Liang - MSFT
@MerlinLiang-MSFT How do I use the classic editor? I can't see an option for itNeil P
When you create one new pipeline. In the first page, do not choose YAML. Focus on the last line “Use the classic editor to create the first pipeline”. Click this.Merlin Liang - MSFT
@MerlinLiang-MSFT I don't see the option, I can only see "New Release Pipeline"Neil P
This is the Classic Editor type. What I mentioned in previous comment is for build. What about create deploy task with this classic editor type?Merlin Liang - MSFT

3 Answers

3
votes

You can either use existing Service principal or create a new one. All you need is in documentation already. Create an Azure Resource Manager service connection using automated security

From Azure DevOps -> Project setting -> Service connection: Then click on "New Service Connection".Choose "Azure resource Manager" as type of service connection. Select Service Principal (Automatic). Run your pipeline

3
votes

I had the same issue, and I initally missed the fact that you need to click the 'Authorize resources' button that appears, as shown below

enter image description here

Also in my case, my pipeline was missing variables that included the correct service connection name. These were set up in a variable group that was already being used by another pipeline. I needed to link them in my new pipeline:

Edit pipeline > select elipsis at top right > triggers > Variables > Variable groups > Link variable group

1
votes

My "Service connection" which defined the service principal connection had been created separately to the task in my release pipeline.

In order for "Authorize Resources" to occur, you must create a new connection from the task itself (you may need to use the advanced options to add an existing service principal).

  1. under "Azure subscription" click the name of the subscription you wish to use
  2. Click the drop down next to "Authorize" and open advanced options
  3. Click " use the full version of the service connection dialog."
  4. Enter all your credentials and hit save