@@ -135,20 +135,6 @@ function Get-ApiopsLogLevel([string]$ScriptLogLevel) {
135135 }
136136}
137137
138- function Get-ApiopsAuthArgs {
139- $authArgs = @ ()
140-
141- if (-not [string ]::IsNullOrWhiteSpace($env: AZURE_CLIENT_ID )) {
142- $authArgs += @ (' --client-id' , $env: AZURE_CLIENT_ID )
143- }
144-
145- if (-not [string ]::IsNullOrWhiteSpace($env: AZURE_TENANT_ID )) {
146- $authArgs += @ (' --tenant-id' , $env: AZURE_TENANT_ID )
147- }
148-
149- return $authArgs
150- }
151-
152138function Invoke-Teardown {
153139 if ($SkipTeardown ) {
154140 Write-Host " ⏭️ Teardown skipped (-SkipTeardown)"
@@ -502,8 +488,6 @@ try {
502488 Write-Host " Output: $ExtractOutputDir "
503489
504490 $apiopsLogLevel = Get-ApiopsLogLevel - ScriptLogLevel $LogLevel
505- $apiopsAuthArgs = Get-ApiopsAuthArgs
506-
507491 # For SKUs that support workspaces (Premium / PremiumV2), pass a filter file
508492 # with the workspace name so the extractor includes workspace-scoped resources.
509493 # Without this, workspace extraction is silently skipped.
@@ -514,7 +498,7 @@ try {
514498 ' --service-name' , $sourceName ,
515499 ' --output' , $ExtractOutputDir ,
516500 ' --log-level' , $apiopsLogLevel
517- ) + $apiopsAuthArgs
501+ )
518502
519503 $extractExitCode = Invoke-MaskedApiopsCommand - Replacements @ {
520504 $sourceSubId = Protect-SubscriptionId - Value $sourceSubId
@@ -657,7 +641,7 @@ loggers:
657641 ' --source' , $ExtractOutputDir ,
658642 ' --overrides' , $overrideFile ,
659643 ' --log-level' , $apiopsLogLevel
660- ) + $apiopsAuthArgs
644+ )
661645
662646 if ($publishExitCode -ne 0 ) {
663647 Write-Host " ❌ Publish failed (exit code $publishExitCode )"
0 commit comments