Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation update for Service Principals #63

Open
jonest opened this issue May 17, 2022 · 0 comments
Open

Documentation update for Service Principals #63

jonest opened this issue May 17, 2022 · 0 comments

Comments

@jonest
Copy link

jonest commented May 17, 2022

I was running into some issues running the Execute Sql task in my pipeline and it turns out that this task requires the use of a secret instead of a certificate, as you can see on this line:

(ConvertTo-SecureString $Endpoint.Auth.Parameters.ServicePrincipalKey -AsPlainText -Force))

The error I would see was:

##[debug]Script stack trace:
##[debug]at Initialize-AzureSubscription, D:\a\_tasks\ExecuteSql_a93d571d-f32c-4fe7-a63a-3599dddd5279\1.4.2999\ps_modules\VstsAzureHelpers\InitializeFunctions.ps1: line 108
##[debug]at Initialize-Azure, D:\a\_tasks\ExecuteSql_a93d571d-f32c-4fe7-a63a-3599dddd5279\1.4.2999\ps_modules\VstsAzureHelpers\VstsAzureHelpers.psm1: line 49
##[debug]at <ScriptBlock>, D:\a\_tasks\ExecuteSql_a93d571d-f32c-4fe7-a63a-3599dddd5279\1.4.2999\ExecuteSql.ps1: line 24
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]at <ScriptBlock>, <No file>: line 22
##[debug]at <ScriptBlock>, <No file>: line 18
##[debug]at <ScriptBlock>, <No file>: line 1
##[debug]Exception:
##[debug]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'String' because it is null.
##[debug]   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
##[debug]   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
##[debug]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
##[debug]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
##[debug]   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
##[debug]   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
##[debug]   at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
##[debug]   at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
##[debug]   at System.Management.Automation.CommandProcessorBase.Complete()
##[error]Cannot bind argument to parameter 'String' because it is null.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant