Skip to content

Error parsing azure Pipelines metadata: sources must contain at least one TokenCredential #7101

@tiwarishrijan

Description

@tiwarishrijan

Report

Keda Core: 2.17.2
Issue: while using Azure AD Workload Identity in Keda it receives an error error parsing azure Pipelines metadata: sources must contain at least one TokenCredential.
Config:

  1. TriggerAuthentication:
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
  name: azure-workload-identity
spec:
  podIdentity:
    provider: azure-workload
    identityId: xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx
    identityTenantId: xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx
  1. ScaledObject:
apiVersion: keda.sh/v1alpha1
kind: ScaledJob
metadata:
  name: shrijan-scaledjob
spec:
  jobTargetRef:
    parallelism: 1
    completions: 1
    activeDeadlineSeconds: 600
    backoffLimit: 0
    template:
      ... # describes the [job template](https://kubernetes.io/docs/concepts/workloads/controllers/job)
  triggers:
    - metadata:
        demands: demand1, demand2
        organizationURLFromEnv: AZP_URL
        poolName: my-pool
        requireAllDemands: "true"
      type: azure-pipelines
      authenticationRef:
        name: azure-workload-identity

Expected Behavior

ScaledJob must be in ready state with azure-workload-identity as authentication .

Actual Behavior

NAME                       MIN   MAX   READY   ACTIVE      PAUSED    TRIGGERS            AUTHENTICATIONS          AGE
shrijan-scaledjob    0        40       False     Unknown   Unknown   azure-pipelines   azure-workload-identity   1s

Steps to Reproduce the Problem

  1. Create a TriggerAuthentication with podIdentity referencing the Azure AD Workload Identity.
  2. Create a ScaledJob referencing the above TriggerAuthentication in its authenticationRef.

Logs from KEDA operator

2025-09-26T10:28:33Z	ERROR	Failed to ensure ScaledJob is correctly created	{"controller": "scaledjob", "controllerGroup": "keda.sh", "controllerKind": "ScaledJob", "ScaledJob": {"name":"shrijan-scaledjob","namespace":"default"}, "namespace": "default", "name": "shrijan-scaledjob", "reconcileID": "e9f5e540-5aa0-4af1-9acc-3d6a2b4a3f69", "error": "error parsing azure Pipelines metadata: sources must contain at least one TokenCredential"}
github.com/kedacore/keda/v2/controllers/keda.(*ScaledJobReconciler).Reconcile
	/workspace/controllers/keda/scaledjob_controller.go:153
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile
	/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:116
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler
	/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:303
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem
	/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:263
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2
	/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:224

KEDA Version

2.17.2

Kubernetes Version

1.32

Platform

Amazon Web Services

Scaler Details

azure-pipeline

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions