0

I want to make use of the Invoke-ASCmd without UserCode/Password within a Devops pipeline. Now the code looks like:

   $securePassword = ConvertTo-SecureString $password -AsPlainText -Force
   $credential = New-Object System.Management.Automation.PSCredential ($username, $securePassword)
   
   $delQuery = '{ "delete": { "object": { "database": "' + $asModelName + '" } } }'
   Invoke-ASCmd -Query $delQuery -TenantId $tenantId -Server $analysisServicesServer -Credential $credential

I want to get rid of the usercode/password combination and use the integrated security Is it possible that the Invoke-ASCmd can use this kind of authentication?

Running it from a devops pipeline I get an error like: Invoke-ASCmd : Authentication failed: User ID and Password are required when user interface is not available.

2
  • As it said: User ID and Password are required when user interface is not available Commented Sep 6, 2023 at 19:40
  • Meaning that you must still use a usercode password to deploy and refresh the model? Invoke-Sqlcmd has an extra AccessToken parameter when provided it uses it from the Managed Identity or the Azure CLI logged in user.... Commented Sep 6, 2023 at 19:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.