diff --git a/pkg/scalers/azure_pipelines_scaler.go b/pkg/scalers/azure_pipelines_scaler.go index 0ddbdcaa4b4..767074d8780 100644 --- a/pkg/scalers/azure_pipelines_scaler.go +++ b/pkg/scalers/azure_pipelines_scaler.go @@ -347,7 +347,7 @@ func validatePoolID(ctx context.Context, logger logr.Logger, poolID string, meta return result.ID, nil } -func getToken(ctx context.Context, logger logr.Logger, metadata *azurePipelinesMetadata, podIdentity kedav1alpha1.AuthPodIdentity, scope string) (string, error) { +func getToken(ctx context.Context, metadata *azurePipelinesMetadata, podIdentity kedav1alpha1.AuthPodIdentity, scope string) (string, error) { token, err := metadata.authContext.cred.GetToken(ctx, policy.TokenRequestOptions{ Scopes: []string{ scope, @@ -374,7 +374,7 @@ func getAzurePipelineRequest(ctx context.Context, logger logr.Logger, urlString case kedav1alpha1.PodIdentityProviderAzureWorkload: //ADO Resource token logger.V(1).Info("making request to ADO REST API using managed identity") - aadToken, err := getToken(ctx, logger, metadata, podIdentity, devopsResource) + aadToken, err := getToken(ctx, metadata, podIdentity, devopsResource) if err != nil { return []byte{}, fmt.Errorf("cannot create workload identity credentials: %w", err) }