My YAML is
pool:
vmImage: 'Ubuntu 16.04'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
- task: AzureRmWebAppDeployment@3
inputs:
azureSubscription: '<mysubscription>'
WebAppName: 'mylinuxapi'
Package: $(System.ArtifactsDirectory)/**/*.zip
Where is the subscription id
When I run the build the error is
Job Job1:Step input azureSubscription references service connection
The service connection does not exist or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz.
[Update]
I am now trying to find how to add a new service end point
It should be the Resource authorization issue. Please see Resources and try the workaround (Troubleshooting authorization for a YAML pipeline
) to fix the issue.
Some resources must be authorized before they can be used. This ensures that only users with sufficient permissions can access potentially sensitive resources such as service connections.
Resource authorization
When you save a pipeline, resource authorization checks for new and
updated resources. If you lack permission to authorize one or more
resources, then saving the pipeline will fail.
If you add a new resource to an existing YAML pipeline, Azure
Pipelines will pick up the change but may not be able to authorize
resources. Your builds may fail until you authorize resources using
the troubleshooting steps below.
Troubleshooting authorization for a YAML pipeline:
When you add a new service endpoint or other resource to a pipeline,
it must be authorized before it will work. If builds fail with an
error message about resource authorization, follow these steps:
- Navigate to the pipeline in the web.
- Switch the default branch to the branch that includes the new
service endpoint reference.
- Save the pipeline.
- Revert back to the original default branch and save the pipeline
again.