What are service connections and how should they authenticate?
IntermediateConceptAzure DevOps, Bicep and Terraform
Answer
A service connection stores how a pipeline authenticates to an external system: Azure Resource Manager, a Docker registry, Kubernetes, GitHub. For Azure, choose Azure Resource Manager → Workload identity federation: Azure DevOps acts as OIDC issuer (https://vstoken.dev.azure.com/<org-id>) with subject sc://<org>/<project>/<connection-name>, trusted by an app registration or user-assigned managed identity.
Lock it down: scope the identity's RBAC narrowly, don't "grant access to all pipelines", and add approvals and checks on the connection (and on environments), so only approved pipelines from protected branches can use the prod connection.
More on Azure DevOps, Bicep and Terraform
What services make up Azure DevOps?BeginnerWhat are branch policies in Azure Repos?BeginnerExplain the YAML pipeline structure in Azure Pipelines.BeginnerWhat are environments in Azure Pipelines?IntermediateWhat deployment strategies do deployment jobs support?IntermediateHow do templates work in Azure Pipelines?Intermediate