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.
User ID and Password are required when user interface is not available