liprec / vsts-release-aas

Repository for my Analysis Service Azure pipelines tasks related to Azure Analysis Service or Power BI Premium
Other
27 stars 28 forks source link

Unable to autodetect IP #80

Closed NandanHegde15 closed 2 years ago

NandanHegde15 commented 2 years ago

With the latest update, we are now facing the below error: Error during detecting agent IP address (Exception calling "Connect" with "1" argument(s): "Unable to obtain authentication token using the credentials provided.")

image

It was working fine before

liprec commented 2 years ago

Can you share the debug log (variable: System.Debug set to true) to provide me some more details?

NandanHegde15 commented 2 years ago

This is the logs 2022-01-06T14:55:32.6383008Z ##[debug]INPUT_AASSERVER: '' 2022-01-06T14:55:32.6478894Z ##[debug]INPUT_DATABASENAME: '' 2022-01-06T14:55:32.6622016Z ##[debug]INPUT_MODELNAME (empty) 2022-01-06T14:55:32.6735100Z ##[debug]INPUT_LOGINTYPE: 'spn' 2022-01-06T14:55:32.6795476Z ##[debug]INPUT_PATHTOMODEL: '' 2022-01-06T14:55:32.6932633Z ##[debug]INPUT_SOURCESQLSERVER: '' 2022-01-06T14:55:32.6987069Z ##[debug]INPUT_SOURCESQLDATABASE: '' 2022-01-06T14:55:32.7084593Z ##[debug]INPUT_SOURCESQLUSERNAME: '' 2022-01-06T14:55:32.7163898Z ##[debug]INPUT_SOURCESQLPASSWORD: '***' 2022-01-06T14:55:32.7229610Z ##[debug]INPUT_DATASOURCES: '[ 2022-01-06T14:55:32.7268406Z ##[debug] { 2022-01-06T14:55:32.7302776Z ##[debug] "name": "<DataSourceName>", 2022-01-06T14:55:32.7365505Z ##[debug] "authenticationKind": "UsernamePassword", 2022-01-06T14:55:32.7426039Z ##[debug] "connectionDetails": { 2022-01-06T14:55:32.7588488Z ##[debug] "address": { 2022-01-06T14:55:32.7652317Z ##[debug] "server": "<ServerName>", 2022-01-06T14:55:32.7702076Z ##[debug] "database": "<DatabaseName>" 2022-01-06T14:55:32.7773349Z ##[debug] } 2022-01-06T14:55:32.7817829Z ##[debug] }, 2022-01-06T14:55:32.7942157Z ##[debug] "credential": { 2022-01-06T14:55:32.7943560Z ##[debug] "Username": "<UserName>", 2022-01-06T14:55:32.7950293Z ##[debug] "Password": "<Password>" 2022-01-06T14:55:32.7992484Z ##[debug] } 2022-01-06T14:55:32.8027295Z ##[debug] } 2022-01-06T14:55:32.8076070Z ##[debug]]' 2022-01-06T14:55:32.8408209Z ##[debug]INPUT_OVERWRITE: 'true' 2022-01-06T14:55:32.8573336Z ##[debug] Converted to bool: True 2022-01-06T14:55:32.8720627Z ##[debug]INPUT_REMOVE: 'false' 2022-01-06T14:55:32.8812862Z ##[debug] Converted to bool: False 2022-01-06T14:55:32.8924739Z ##[debug]INPUT_PARTITIONDEPLOYMENT: 'retainpartitions' 2022-01-06T14:55:32.9008351Z ##[debug]INPUT_ROLEDEPLOYMENT: 'retainroles' 2022-01-06T14:55:32.9094651Z ##[debug]INPUT_IPDETECTIONMETHOD: 'autoDetect' 2022-01-06T14:55:32.9218570Z ##[debug]INPUT_DELETEFIREWALLRULE: 'true' 2022-01-06T14:55:32.9283150Z ##[debug] Converted to bool: True 2022-01-06T14:55:32.9450978Z ##[debug]Loading module from path 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\ps_modules\VstsAzureRestHelpers_\VstsAzureRestHelpers_.psm1'. 2022-01-06T14:55:32.9765044Z ##[debug]$OVERRIDING $global:DebugPreference from 'Continue' to 'SilentlyContinue'. 2022-01-06T14:55:32.9865328Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\ps_modules\VstsAzureRestHelpers_/module.json 2022-01-06T14:55:33.0331876Z ##[debug]Loaded 11 strings. 2022-01-06T14:55:33.0417478Z ##[debug]SYSTEM_CULTURE: 'en-US' 2022-01-06T14:55:33.0572118Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\ps_modules\VstsAzureRestHelpers_\Strings\resources.resjson\en-US\resources.resjson 2022-01-06T14:55:33.1253783Z ##[debug]Loaded 11 strings. 2022-01-06T14:55:33.1324762Z ##[debug]Loading module from path 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\ps_modules\TlsHelper_\TlsHelper_.psm1'. 2022-01-06T14:55:33.1372304Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\ps_modules\TlsHelper_/module.json 2022-01-06T14:55:33.1568340Z ##[debug]Loaded 3 strings. 2022-01-06T14:55:33.1727898Z ##[debug]SYSTEM_CULTURE: 'en-US' 2022-01-06T14:55:33.1781391Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\ps_modules\TlsHelper_\Strings\resources.resjson\en-US\resources.resjson 2022-01-06T14:55:33.2055358Z ##[debug]Loaded 3 strings. 2022-01-06T14:55:33.2097859Z ##[debug]Exporting function 'Add-Tls12InSession'. 2022-01-06T14:55:33.2498218Z ##[debug]Exporting function 'Assert-TlsError'. 2022-01-06T14:55:33.2544868Z ##[debug]Importing function 'Add-Tls12InSession'. 2022-01-06T14:55:33.2585300Z ##[debug]Importing function 'Assert-TlsError'. 2022-01-06T14:55:33.3471368Z ##[debug]TLS 1.2 already present in session. 2022-01-06T14:55:33.3508355Z ##[debug]Exporting function 'Add-AzureSqlDatabaseServerFirewallRule'. 2022-01-06T14:55:33.3545560Z ##[debug]Exporting function 'Remove-AzureSqlDatabaseServerFirewallRule'. 2022-01-06T14:55:33.3589333Z ##[debug]Exporting function 'Get-AzStorageKeys'. 2022-01-06T14:55:33.3683888Z ##[debug]Exporting function 'Get-AzRMStorageKeys'. 2022-01-06T14:55:33.3720762Z ##[debug]Exporting function 'Get-AzRmVmCustomScriptExtension'. 2022-01-06T14:55:33.3773981Z ##[debug]Exporting function 'Remove-AzRmVmCustomScriptExtension'. 2022-01-06T14:55:33.3817895Z ##[debug]Exporting function 'Get-AzStorageAccount'. 2022-01-06T14:55:33.3894416Z ##[debug]Exporting function 'Get-AzRmStorageAccount'. 2022-01-06T14:55:33.4010875Z ##[debug]Exporting function 'Get-AzRmResourceGroup'. 2022-01-06T14:55:33.4094293Z ##[debug]Exporting function 'Get-AzureNetworkInterfaceDetails'. 2022-01-06T14:55:33.4136122Z ##[debug]Exporting function 'Get-AzurePublicIpAddressDetails'. 2022-01-06T14:55:33.4246616Z ##[debug]Exporting function 'Get-AzureLoadBalancersDetails'. 2022-01-06T14:55:33.4320132Z ##[debug]Exporting function 'Get-AzureLoadBalancerDetails'. 2022-01-06T14:55:33.4439974Z ##[debug]Exporting function 'Get-AzureRMLoadBalancerFrontendIpConfigDetails'. 2022-01-06T14:55:33.4503557Z ##[debug]Exporting function 'Get-AzureRMLoadBalancerInboundNatRuleConfigDetails'. 2022-01-06T14:55:33.4551954Z ##[debug]Exporting function 'Get-AzureRMAccessToken'. 2022-01-06T14:55:33.4684472Z ##[debug]Exporting function 'Get-ExceptionMessage'. 2022-01-06T14:55:33.4756907Z ##[debug]Exporting function 'Get-ConnectionType'. 2022-01-06T14:55:33.4803546Z ##[debug]Exporting function 'IsAzureRmConnection'. 2022-01-06T14:55:33.4884511Z ##[debug]Importing function 'Add-AzureSqlDatabaseServerFirewallRule'. 2022-01-06T14:55:33.4938792Z ##[debug]Importing function 'Get-AzRmResourceGroup'. 2022-01-06T14:55:33.4978202Z ##[debug]Importing function 'Get-AzRmStorageAccount'. 2022-01-06T14:55:33.5014850Z ##[debug]Importing function 'Get-AzRMStorageKeys'. 2022-01-06T14:55:33.5049835Z ##[debug]Importing function 'Get-AzRmVmCustomScriptExtension'. 2022-01-06T14:55:33.5102376Z ##[debug]Importing function 'Get-AzStorageAccount'. 2022-01-06T14:55:33.5149348Z ##[debug]Importing function 'Get-AzStorageKeys'. 2022-01-06T14:55:33.5210480Z ##[debug]Importing function 'Get-AzureLoadBalancerDetails'. 2022-01-06T14:55:33.5283159Z ##[debug]Importing function 'Get-AzureLoadBalancersDetails'. 2022-01-06T14:55:33.5386359Z ##[debug]Importing function 'Get-AzureNetworkInterfaceDetails'. 2022-01-06T14:55:33.5433440Z ##[debug]Importing function 'Get-AzurePublicIpAddressDetails'. 2022-01-06T14:55:33.5529167Z ##[debug]Importing function 'Get-AzureRMAccessToken'. 2022-01-06T14:55:33.5570511Z ##[debug]Importing function 'Get-AzureRMLoadBalancerFrontendIpConfigDetails'. 2022-01-06T14:55:33.5621998Z ##[debug]Importing function 'Get-AzureRMLoadBalancerInboundNatRuleConfigDetails'. 2022-01-06T14:55:33.5661901Z ##[debug]Importing function 'Get-ConnectionType'. 2022-01-06T14:55:33.5734421Z ##[debug]Importing function 'Get-ExceptionMessage'. 2022-01-06T14:55:33.5828100Z ##[debug]Importing function 'IsAzureRmConnection'. 2022-01-06T14:55:33.5924323Z ##[debug]Importing function 'Remove-AzRmVmCustomScriptExtension'. 2022-01-06T14:55:33.5985201Z ##[debug]Importing function 'Remove-AzureSqlDatabaseServerFirewallRule'. 2022-01-06T14:55:33.6033445Z ##[debug]Loading module from path 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\VstsAzureRestHelperExtra_.psm1'. 2022-01-06T14:55:33.6181321Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4/ps_modules/VstsAzureRestHelpers_/module.json 2022-01-06T14:55:33.6265610Z ##[debug]Loaded 11 strings. 2022-01-06T14:55:33.6332251Z ##[debug]SYSTEM_CULTURE: 'en-US' 2022-01-06T14:55:33.6379416Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\ps_modules\VstsAzureRestHelpers_\Strings\resources.resjson\en-US\resources.resjson 2022-01-06T14:55:33.6475199Z ##[debug]Loaded 11 strings. 2022-01-06T14:55:33.6542008Z ##[debug]Importing function 'Add-Tls12InSession'. 2022-01-06T14:55:33.6596060Z ##[debug]Importing function 'Assert-TlsError'. 2022-01-06T14:55:33.6656407Z ##[debug]TLS 1.2 already present in session. 2022-01-06T14:55:33.6704675Z ##[debug]Importing function 'Add-AzureSqlDatabaseServerFirewallRule'. 2022-01-06T14:55:33.6745891Z ##[debug]Importing function 'Get-AzRmResourceGroup'. 2022-01-06T14:55:33.6797282Z ##[debug]Importing function 'Get-AzRmStorageAccount'. 2022-01-06T14:55:33.6899658Z ##[debug]Importing function 'Get-AzRMStorageKeys'. 2022-01-06T14:55:33.7005920Z ##[debug]Importing function 'Get-AzRmVmCustomScriptExtension'. 2022-01-06T14:55:33.7054458Z ##[debug]Importing function 'Get-AzStorageAccount'. 2022-01-06T14:55:33.7115422Z ##[debug]Importing function 'Get-AzStorageKeys'. 2022-01-06T14:55:33.7205303Z ##[debug]Importing function 'Get-AzureLoadBalancerDetails'. 2022-01-06T14:55:33.7248193Z ##[debug]Importing function 'Get-AzureLoadBalancersDetails'. 2022-01-06T14:55:33.7288659Z ##[debug]Importing function 'Get-AzureNetworkInterfaceDetails'. 2022-01-06T14:55:33.7326949Z ##[debug]Importing function 'Get-AzurePublicIpAddressDetails'. 2022-01-06T14:55:33.7389512Z ##[debug]Importing function 'Get-AzureRMAccessToken'. 2022-01-06T14:55:33.7454548Z ##[debug]Importing function 'Get-AzureRMLoadBalancerFrontendIpConfigDetails'. 2022-01-06T14:55:33.7487352Z ##[debug]Importing function 'Get-AzureRMLoadBalancerInboundNatRuleConfigDetails'. 2022-01-06T14:55:33.7554482Z ##[debug]Importing function 'Get-ConnectionType'. 2022-01-06T14:55:33.7591265Z ##[debug]Importing function 'Get-ExceptionMessage'. 2022-01-06T14:55:33.7639882Z ##[debug]Importing function 'IsAzureRmConnection'. 2022-01-06T14:55:33.7684659Z ##[debug]Importing function 'Remove-AzRmVmCustomScriptExtension'. 2022-01-06T14:55:33.7778649Z ##[debug]Importing function 'Remove-AzureSqlDatabaseServerFirewallRule'. 2022-01-06T14:55:33.7850658Z ##[debug]Exporting function 'Add-AzureAnalysisServicesFirewallRule'. 2022-01-06T14:55:33.7887341Z ##[debug]Exporting function 'Remove-AzureAnalysisServicesFirewallRule'. 2022-01-06T14:55:33.7990281Z ##[debug]Exporting function 'Get-AzureAnalysisServicesStatus'. 2022-01-06T14:55:33.8133567Z ##[debug]Importing function 'Add-AzureAnalysisServicesFirewallRule'. 2022-01-06T14:55:33.8172055Z ##[debug]Importing function 'Get-AzureAnalysisServicesStatus'. 2022-01-06T14:55:33.8222953Z ##[debug]Importing function 'Remove-AzureAnalysisServicesFirewallRule'. 2022-01-06T14:55:33.8267588Z ##[debug]Loading module from path 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\deploy-aas-db.psm1'. 2022-01-06T14:55:33.8409179Z ##[debug]Exporting function 'LoadDlls'. 2022-01-06T14:55:33.8448732Z ##[debug]Exporting function 'LoadTabularDatabaseFromFile'. 2022-01-06T14:55:33.8508378Z ##[debug]Exporting function 'LoadTabularDatabaseFromServer'. 2022-01-06T14:55:33.8567997Z ##[debug]Exporting function 'MergeDatabases'. 2022-01-06T14:55:33.8664781Z ##[debug]Exporting function 'Get-AgentIpAddress'. 2022-01-06T14:55:33.8803458Z ##[debug]Exporting function 'ProcessMessages'. 2022-01-06T14:55:33.8819903Z ##[debug]Importing function 'Get-AgentIpAddress'. 2022-01-06T14:55:33.8877369Z ##[debug]Importing function 'LoadDlls'. 2022-01-06T14:55:33.8918060Z ##[debug]Importing function 'LoadTabularDatabaseFromFile'. 2022-01-06T14:55:33.9010051Z ##[debug]Importing function 'LoadTabularDatabaseFromServer'. 2022-01-06T14:55:33.9053615Z ##[debug]Importing function 'MergeDatabases'. 2022-01-06T14:55:33.9109859Z ##[debug]Importing function 'ProcessMessages'. 2022-01-06T14:55:33.9258484Z ##[debug]Loading assembly: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\assemblies\Microsoft.AnalysisServices.Core.dll 2022-01-06T14:55:34.1256599Z ##[debug]Loading assembly: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\assemblies\Microsoft.AnalysisServices.dll 2022-01-06T14:55:34.1877696Z ##[debug]Loading assembly: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\assemblies\Microsoft.AnalysisServices.Tabular.dll 2022-01-06T14:55:34.3362750Z ##[debug]Loading assembly: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\assemblies\Microsoft.AnalysisServices.Tabular.Json.dll 2022-01-06T14:55:34.4143509Z ##[warning]The 'overwrite' option will be deprecated in a future version. 2022-01-06T14:55:34.4154020Z ##[debug]Processed: ##vso[task.logissue type=warning]The 'overwrite' option will be deprecated in a future version. 2022-01-06T14:55:34.4252952Z ##[debug]Retrieving service principal 2022-01-06T14:55:34.4340704Z ##[debug]INPUT_APPID: 'd579b78e-1b6e-4c95-8a9f-56eff5c79471' 2022-01-06T14:55:34.4390969Z ##[debug]INPUT_TENANTID: '***' 2022-01-06T14:55:34.4447621Z ##[debug]INPUT_APPKEY: '***' 2022-01-06T14:55:34.5598709Z ##[debug]Entering Get-AzureAnalysisServicesStatus. 2022-01-06T14:55:34.5903867Z ##[debug] endpoint: '@{Url=https://management.azure.com/; Data=; Auth=}' 2022-01-06T14:55:34.5940732Z ##[debug] serverName: '' 2022-01-06T14:55:34.6011305Z ##[debug]Getting running status of azure analysis services server: tas 2022-01-06T14:55:34.6157038Z ##[debug]Connection type used is ServicePrincipal 2022-01-06T14:55:34.6209719Z ##[debug]Connection type used is ServicePrincipal 2022-01-06T14:55:34.6414301Z ##[debug]Getting azure analysis service properties: '' 2022-01-06T14:55:34.6795887Z ##[debug]Fetching Access Token (spn) 2022-01-06T14:55:34.8509990Z ##[debug]POST https://login.windows.net/***/oauth2/v2.0/token with -1-byte payload 2022-01-06T14:55:35.1325576Z ##[debug]received 1487-byte response of content type application/json; charset=utf-8 2022-01-06T14:55:35.1899014Z ##[debug]Get Resource Groups 2022-01-06T14:55:35.2220054Z ##[debug]Fetching Resources from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 2022-01-06T14:55:35.2261973Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 with 0-byte payload 2022-01-06T14:55:36.6598885Z ##[debug]received 68616-byte response of content type application/json; charset=utf-8 2022-01-06T14:55:36.6838151Z ##[debug]Fetching properties from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 2022-01-06T14:55:36.6938438Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 with 0-byte payload 2022-01-06T14:55:37.3512033Z ##[debug]received 906-byte response of content type application/json; charset=utf-8 2022-01-06T14:55:37.3687666Z ##[debug]Remove leftover firewall rule 2022-01-06T14:55:37.3793267Z ##[debug]Entering Remove-AzureAnalysisServicesFirewallRule. 2022-01-06T14:55:37.3841613Z ##[debug] endpoint: '@{Url=https://management.azure.com/; Data=; Auth=}' 2022-01-06T14:55:37.3890799Z ##[debug] serverName: 'tas' 2022-01-06T14:55:37.3957880Z ##[debug] firewallRuleName: 'vsts-release-aas-rule' 2022-01-06T14:55:37.4045906Z ##[debug]Removing firewall rule 'vsts-release-aas-rule' on azure analysis services server: tas 2022-01-06T14:55:37.4093391Z ##[debug]Connection type used is ServicePrincipal 2022-01-06T14:55:37.4226700Z ##[debug]Connection type used is ServicePrincipal 2022-01-06T14:55:37.4295575Z ##[debug]Getting azure analysis service properties: 'tas' 2022-01-06T14:55:37.4381898Z ##[debug]Fetching Access Token (spn) 2022-01-06T14:55:37.4521818Z ##[debug]POST https://login.windows.net/***/oauth2/v2.0/token with -1-byte payload 2022-01-06T14:55:37.6737959Z ##[debug]received 1487-byte response of content type application/json; charset=utf-8 2022-01-06T14:55:37.6779150Z ##[debug]Get Resource Groups 2022-01-06T14:55:37.6826786Z ##[debug]Fetching Resources from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 2022-01-06T14:55:37.6866506Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 with 0-byte payload 2022-01-06T14:55:38.9755726Z ##[debug]received 68616-byte response of content type application/json; charset=utf-8 2022-01-06T14:55:38.9924244Z ##[debug]Fetching properties from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 2022-01-06T14:55:39.0064971Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 with 0-byte payload 2022-01-06T14:55:39.1349160Z ##[debug]received 906-byte response of content type application/json; charset=utf-8 2022-01-06T14:55:39.1446136Z ##[debug]Removed firewall rule 'vsts-release-aas-rule' on azure database server: tas 2022-01-06T14:55:39.1509675Z ##[debug]Get agent IP address 2022-01-06T14:55:40.7486631Z ##[debug]Leaving D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\deploy-aas-db.ps1. 2022-01-06T14:55:40.7649915Z ##[debug]Caught exception from task script. 2022-01-06T14:55:40.7716861Z ##[debug]Error record: 2022-01-06T14:55:40.8593872Z ##[debug]D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\deploy-aas-db.ps1 : Error during detecting agent IP address (Exception calling "Connect" with "1" argument(s): "Unable to obtain authentication token using the credentials provided.") 2022-01-06T14:55:40.8640469Z ##[debug]At line:1 char:1 2022-01-06T14:55:40.8687108Z ##[debug]+ . 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5 ... 2022-01-06T14:55:40.8716727Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2022-01-06T14:55:40.8749915Z ##[debug] + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException 2022-01-06T14:55:40.8781436Z ##[debug] + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,deploy-aas-db.ps1 2022-01-06T14:55:40.8840377Z ##[debug] 2022-01-06T14:55:40.8881952Z ##[debug]Script stack trace: 2022-01-06T14:55:40.8958183Z ##[debug]at <ScriptBlock>, D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.4\deploy-aas-db.ps1: line 248 2022-01-06T14:55:40.8990754Z ##[debug]at <ScriptBlock>, <No file>: line 1 2022-01-06T14:55:40.9117800Z ##[debug]at <ScriptBlock>, <No file>: line 22 2022-01-06T14:55:40.9156255Z ##[debug]at <ScriptBlock>, <No file>: line 18 2022-01-06T14:55:40.9187095Z ##[debug]at <ScriptBlock>, <No file>: line 1 2022-01-06T14:55:40.9221315Z ##[debug]Exception: 2022-01-06T14:55:40.9324906Z ##[debug]Microsoft.PowerShell.Commands.WriteErrorException: Error during detecting agent IP address (Exception calling "Connect" with "1" argument(s): "Unable to obtain authentication token using the credentials provided.") 2022-01-06T14:55:40.9479195Z ##[error]Error during detecting agent IP address (Exception calling "Connect" with "1" argument(s): "Unable to obtain authentication token using the credentials provided.") 2022-01-06T14:55:40.9485223Z ##[debug]Processed: ##vso[task.logissue type=error]Error during detecting agent IP address (Exception calling "Connect" with "1" argument(s): "Unable to obtain authentication token using the credentials provided.") 2022-01-06T14:55:40.9503954Z ##[debug]Processed: ##vso[task.complete result=Failed]

Note: I have scrubbed some sensitive values

liprec commented 2 years ago

Looks like the used SPN provided in the task is not a 'Analysis Service admin'. Can you make sure that the SPN is added to the 'Analysis Service admin' in the format app:<applicationId>@<tenantId>?

NandanHegde15 commented 2 years ago

Hey, We already have that added as the AAS admin and still we are getting the above error.

And on another note: I added a static range of IPs and getting the below error:

' 2022-01-07T07:37:40.3819799Z ##[debug]INPUT_AASSERVER: '' 2022-01-07T07:37:40.3858913Z ##[debug]INPUT_DATABASENAME: '' 2022-01-07T07:37:40.3985265Z ##[debug]INPUT_MODELNAME 2022-01-07T07:37:40.4170205Z ##[debug]INPUT_LOGINTYPE: 'spn' 2022-01-07T07:37:40.4237874Z ##[debug]INPUT_PATHTOMODEL: '' 2022-01-07T07:37:40.4306853Z ##[debug]INPUT_CONNECTIONTYPE: 'sql' 2022-01-07T07:37:40.4341445Z ##[debug]Retrieving 'sql' credentials 2022-01-07T07:37:40.4385485Z ##[debug]INPUT_SOURCESQLSERVER: '' 2022-01-07T07:37:40.4521412Z ##[debug]INPUT_SOURCESQLDATABASE: '' 2022-01-07T07:37:40.4522593Z ##[debug]INPUT_SOURCESQLUSERNAME: '' 2022-01-07T07:37:40.4524093Z ##[debug]INPUT_SOURCESQLPASSWORD: '***' 2022-01-07T07:37:40.4549466Z ##[debug]INPUT_OVERWRITE: 'true' 2022-01-07T07:37:40.4609066Z ##[debug] Converted to bool: True 2022-01-07T07:37:40.4830935Z ##[debug]INPUT_REMOVE: 'false' 2022-01-07T07:37:40.4853944Z ##[debug] Converted to bool: False 2022-01-07T07:37:40.4855543Z ##[debug]INPUT_PARTITIONDEPLOYMENT: 'retainpartitions' 2022-01-07T07:37:40.4856928Z ##[debug]INPUT_ROLEDEPLOYMENT: 'retainroles' 2022-01-07T07:37:40.4901986Z ##[debug]INPUT_IPDETECTIONMETHOD: 'ipAddressRange' 2022-01-07T07:37:40.4949777Z ##[debug]INPUT_DELETEFIREWALLRULE: 'true' 2022-01-07T07:37:40.4982746Z ##[debug] Converted to bool: True 2022-01-07T07:37:40.5022863Z ##[debug]INPUT_STARTIPADDRESS: '0.0.0.1' 2022-01-07T07:37:40.5060700Z ##[debug]INPUT_ENDIPADDRESS: '255.255.255.254' 2022-01-07T07:37:40.5186804Z ##[debug]Loading module from path 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\ps_modules\VstsAzureRestHelpers_\VstsAzureRestHelpers_.psm1'. 2022-01-07T07:37:40.5397563Z ##[debug]$OVERRIDING $global:DebugPreference from 'Continue' to 'SilentlyContinue'. 2022-01-07T07:37:40.5442993Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\ps_modules\VstsAzureRestHelpers_/module.json 2022-01-07T07:37:40.6682340Z ##[debug]Loaded 11 strings. 2022-01-07T07:37:40.6773395Z ##[debug]SYSTEM_CULTURE: 'en-US' 2022-01-07T07:37:40.6819056Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\ps_modules\VstsAzureRestHelpers_\Strings\resources.resjson\en-US\resources.resjson 2022-01-07T07:37:40.7395520Z ##[debug]Loaded 11 strings. 2022-01-07T07:37:40.7441695Z ##[debug]Loading module from path 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\ps_modules\TlsHelper_\TlsHelper_.psm1'. 2022-01-07T07:37:40.7552155Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\ps_modules\TlsHelper_/module.json 2022-01-07T07:37:40.7777009Z ##[debug]Loaded 3 strings. 2022-01-07T07:37:40.7822482Z ##[debug]SYSTEM_CULTURE: 'en-US' 2022-01-07T07:37:40.7865604Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\ps_modules\TlsHelper_\Strings\resources.resjson\en-US\resources.resjson 2022-01-07T07:37:40.7985710Z ##[debug]Loaded 3 strings. 2022-01-07T07:37:40.8020298Z ##[debug]Exporting function 'Add-Tls12InSession'. 2022-01-07T07:37:40.8145726Z ##[debug]Exporting function 'Assert-TlsError'. 2022-01-07T07:37:40.8182720Z ##[debug]Importing function 'Add-Tls12InSession'. 2022-01-07T07:37:40.8263471Z ##[debug]Importing function 'Assert-TlsError'. 2022-01-07T07:37:40.8702571Z ##[debug]TLS 1.2 already present in session. 2022-01-07T07:37:40.8737962Z ##[debug]Exporting function 'Add-AzureSqlDatabaseServerFirewallRule'. 2022-01-07T07:37:40.8796444Z ##[debug]Exporting function 'Remove-AzureSqlDatabaseServerFirewallRule'. 2022-01-07T07:37:40.8845776Z ##[debug]Exporting function 'Get-AzStorageKeys'. 2022-01-07T07:37:40.8878954Z ##[debug]Exporting function 'Get-AzRMStorageKeys'. 2022-01-07T07:37:40.8942889Z ##[debug]Exporting function 'Get-AzRmVmCustomScriptExtension'. 2022-01-07T07:37:40.8997781Z ##[debug]Exporting function 'Remove-AzRmVmCustomScriptExtension'. 2022-01-07T07:37:40.9002875Z ##[debug]Exporting function 'Get-AzStorageAccount'. 2022-01-07T07:37:40.9054416Z ##[debug]Exporting function 'Get-AzRmStorageAccount'. 2022-01-07T07:37:40.9084120Z ##[debug]Exporting function 'Get-AzRmResourceGroup'. 2022-01-07T07:37:40.9282140Z ##[debug]Exporting function 'Get-AzureNetworkInterfaceDetails'. 2022-01-07T07:37:40.9329952Z ##[debug]Exporting function 'Get-AzurePublicIpAddressDetails'. 2022-01-07T07:37:40.9396540Z ##[debug]Exporting function 'Get-AzureLoadBalancersDetails'. 2022-01-07T07:37:40.9539596Z ##[debug]Exporting function 'Get-AzureLoadBalancerDetails'. 2022-01-07T07:37:40.9636105Z ##[debug]Exporting function 'Get-AzureRMLoadBalancerFrontendIpConfigDetails'. 2022-01-07T07:37:40.9672033Z ##[debug]Exporting function 'Get-AzureRMLoadBalancerInboundNatRuleConfigDetails'. 2022-01-07T07:37:40.9807453Z ##[debug]Exporting function 'Get-AzureRMAccessToken'. 2022-01-07T07:37:40.9856519Z ##[debug]Exporting function 'Get-ExceptionMessage'. 2022-01-07T07:37:41.0017512Z ##[debug]Exporting function 'Get-ConnectionType'. 2022-01-07T07:37:41.0144492Z ##[debug]Exporting function 'IsAzureRmConnection'. 2022-01-07T07:37:41.0185968Z ##[debug]Importing function 'Add-AzureSqlDatabaseServerFirewallRule'. 2022-01-07T07:37:41.0222098Z ##[debug]Importing function 'Get-AzRmResourceGroup'. 2022-01-07T07:37:41.0281572Z ##[debug]Importing function 'Get-AzRmStorageAccount'. 2022-01-07T07:37:41.0313080Z ##[debug]Importing function 'Get-AzRMStorageKeys'. 2022-01-07T07:37:41.0349383Z ##[debug]Importing function 'Get-AzRmVmCustomScriptExtension'. 2022-01-07T07:37:41.0417479Z ##[debug]Importing function 'Get-AzStorageAccount'. 2022-01-07T07:37:41.0431909Z ##[debug]Importing function 'Get-AzStorageKeys'. 2022-01-07T07:37:41.0463841Z ##[debug]Importing function 'Get-AzureLoadBalancerDetails'. 2022-01-07T07:37:41.0491825Z ##[debug]Importing function 'Get-AzureLoadBalancersDetails'. 2022-01-07T07:37:41.0625673Z ##[debug]Importing function 'Get-AzureNetworkInterfaceDetails'. 2022-01-07T07:37:41.0657613Z ##[debug]Importing function 'Get-AzurePublicIpAddressDetails'. 2022-01-07T07:37:41.0696063Z ##[debug]Importing function 'Get-AzureRMAccessToken'. 2022-01-07T07:37:41.0785320Z ##[debug]Importing function 'Get-AzureRMLoadBalancerFrontendIpConfigDetails'. 2022-01-07T07:37:41.0818041Z ##[debug]Importing function 'Get-AzureRMLoadBalancerInboundNatRuleConfigDetails'. 2022-01-07T07:37:41.0846622Z ##[debug]Importing function 'Get-ConnectionType'. 2022-01-07T07:37:41.0875604Z ##[debug]Importing function 'Get-ExceptionMessage'. 2022-01-07T07:37:41.0906252Z ##[debug]Importing function 'IsAzureRmConnection'. 2022-01-07T07:37:41.1031535Z ##[debug]Importing function 'Remove-AzRmVmCustomScriptExtension'. 2022-01-07T07:37:41.1070617Z ##[debug]Importing function 'Remove-AzureSqlDatabaseServerFirewallRule'. 2022-01-07T07:37:41.1135856Z ##[debug]Loading module from path 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\VstsAzureRestHelperExtra_.psm1'. 2022-01-07T07:37:41.1347056Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5/ps_modules/VstsAzureRestHelpers_/module.json 2022-01-07T07:37:41.1349194Z ##[debug]Loaded 11 strings. 2022-01-07T07:37:41.1399906Z ##[debug]SYSTEM_CULTURE: 'en-US' 2022-01-07T07:37:41.1442368Z ##[debug]Loading resource strings from: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\ps_modules\VstsAzureRestHelpers_\Strings\resources.resjson\en-US\resources.resjson 2022-01-07T07:37:41.1550982Z ##[debug]Loaded 11 strings. 2022-01-07T07:37:41.1591635Z ##[debug]Importing function 'Add-Tls12InSession'. 2022-01-07T07:37:41.1723393Z ##[debug]Importing function 'Assert-TlsError'. 2022-01-07T07:37:41.1758164Z ##[debug]TLS 1.2 already present in session. 2022-01-07T07:37:41.1865871Z ##[debug]Importing function 'Add-AzureSqlDatabaseServerFirewallRule'. 2022-01-07T07:37:41.1915067Z ##[debug]Importing function 'Get-AzRmResourceGroup'. 2022-01-07T07:37:41.1947311Z ##[debug]Importing function 'Get-AzRmStorageAccount'. 2022-01-07T07:37:41.1976633Z ##[debug]Importing function 'Get-AzRMStorageKeys'. 2022-01-07T07:37:41.2007435Z ##[debug]Importing function 'Get-AzRmVmCustomScriptExtension'. 2022-01-07T07:37:41.2053882Z ##[debug]Importing function 'Get-AzStorageAccount'. 2022-01-07T07:37:41.2059982Z ##[debug]Importing function 'Get-AzStorageKeys'. 2022-01-07T07:37:41.2091965Z ##[debug]Importing function 'Get-AzureLoadBalancerDetails'. 2022-01-07T07:37:41.2127755Z ##[debug]Importing function 'Get-AzureLoadBalancersDetails'. 2022-01-07T07:37:41.2170359Z ##[debug]Importing function 'Get-AzureNetworkInterfaceDetails'. 2022-01-07T07:37:41.2234399Z ##[debug]Importing function 'Get-AzurePublicIpAddressDetails'. 2022-01-07T07:37:41.2269666Z ##[debug]Importing function 'Get-AzureRMAccessToken'. 2022-01-07T07:37:41.2296767Z ##[debug]Importing function 'Get-AzureRMLoadBalancerFrontendIpConfigDetails'. 2022-01-07T07:37:41.2367189Z ##[debug]Importing function 'Get-AzureRMLoadBalancerInboundNatRuleConfigDetails'. 2022-01-07T07:37:41.2480425Z ##[debug]Importing function 'Get-ConnectionType'. 2022-01-07T07:37:41.2580601Z ##[debug]Importing function 'Get-ExceptionMessage'. 2022-01-07T07:37:41.2615574Z ##[debug]Importing function 'IsAzureRmConnection'. 2022-01-07T07:37:41.2677461Z ##[debug]Importing function 'Remove-AzRmVmCustomScriptExtension'. 2022-01-07T07:37:41.2716345Z ##[debug]Importing function 'Remove-AzureSqlDatabaseServerFirewallRule'. 2022-01-07T07:37:41.2837589Z ##[debug]Exporting function 'Add-AzureAnalysisServicesFirewallRule'. 2022-01-07T07:37:41.2874368Z ##[debug]Exporting function 'Remove-AzureAnalysisServicesFirewallRule'. 2022-01-07T07:37:41.2988897Z ##[debug]Exporting function 'Get-AzureAnalysisServicesStatus'. 2022-01-07T07:37:41.3038105Z ##[debug]Importing function 'Add-AzureAnalysisServicesFirewallRule'. 2022-01-07T07:37:41.3055185Z ##[debug]Importing function 'Get-AzureAnalysisServicesStatus'. 2022-01-07T07:37:41.3127067Z ##[debug]Importing function 'Remove-AzureAnalysisServicesFirewallRule'. 2022-01-07T07:37:41.3192869Z ##[debug]Loading module from path 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\deploy-aas-db.psm1'. 2022-01-07T07:37:41.3831787Z ##[debug]Exporting function 'LoadDlls'. 2022-01-07T07:37:41.3880748Z ##[debug]Exporting function 'LoadTabularDatabaseFromFile'. 2022-01-07T07:37:41.3911585Z ##[debug]Exporting function 'LoadTabularDatabaseFromServer'. 2022-01-07T07:37:41.4015620Z ##[debug]Exporting function 'MergeDatabases'. 2022-01-07T07:37:41.4057762Z ##[debug]Exporting function 'Get-AgentIpAddress'. 2022-01-07T07:37:41.4167325Z ##[debug]Exporting function 'ProcessMessages'. 2022-01-07T07:37:41.4223330Z ##[debug]Importing function 'Get-AgentIpAddress'. 2022-01-07T07:37:41.4294389Z ##[debug]Importing function 'LoadDlls'. 2022-01-07T07:37:41.4327440Z ##[debug]Importing function 'LoadTabularDatabaseFromFile'. 2022-01-07T07:37:41.4360861Z ##[debug]Importing function 'LoadTabularDatabaseFromServer'. 2022-01-07T07:37:41.4390868Z ##[debug]Importing function 'MergeDatabases'. 2022-01-07T07:37:41.4430662Z ##[debug]Importing function 'ProcessMessages'. 2022-01-07T07:37:41.4584793Z ##[debug]Loading assembly: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\assemblies\Microsoft.AnalysisServices.Core.dll 2022-01-07T07:37:41.6319298Z ##[debug]Loading assembly: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\assemblies\Microsoft.AnalysisServices.dll 2022-01-07T07:37:41.7009152Z ##[debug]Loading assembly: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\assemblies\Microsoft.AnalysisServices.Tabular.dll 2022-01-07T07:37:41.7965868Z ##[debug]Loading assembly: D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\assemblies\Microsoft.AnalysisServices.Tabular.Json.dll 2022-01-07T07:37:41.8700562Z ##[warning]The 'overwrite' option will be deprecated in a future version. 2022-01-07T07:37:41.8714850Z ##[debug]Processed: ##vso[task.logissue type=warning]The 'overwrite' option will be deprecated in a future version. 2022-01-07T07:37:41.8717978Z ##[debug]Retrieving service principal 2022-01-07T07:37:41.8807518Z ##[debug]INPUT_APPID: 'd579b78e-1b6e-4c95-8a9f-56eff5c79471' 2022-01-07T07:37:41.8849224Z ##[debug]INPUT_TENANTID: '***' 2022-01-07T07:37:41.8980191Z ##[debug]INPUT_APPKEY: '***' 2022-01-07T07:37:41.9699633Z ##[debug]Entering Get-AzureAnalysisServicesStatus. 2022-01-07T07:37:41.9892363Z ##[debug] endpoint: '@{Url=https://management.azure.com/; Data=; Auth=}' 2022-01-07T07:37:41.9966291Z ##[debug] serverName: '' 2022-01-07T07:37:42.0030994Z ##[debug]Getting running status of azure analysis services server: 2022-01-07T07:37:42.0173765Z ##[debug]Connection type used is ServicePrincipal 2022-01-07T07:37:42.0214674Z ##[debug]Connection type used is ServicePrincipal 2022-01-07T07:37:42.0291199Z ##[debug]Getting azure analysis service properties: 2022-01-07T07:37:42.0676423Z ##[debug]Fetching Access Token (spn) 2022-01-07T07:37:42.1494171Z ##[debug]POST https://login.windows.net/***/oauth2/v2.0/token with -1-byte payload 2022-01-07T07:37:42.3317160Z ##[debug]received 1487-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:42.3667079Z ##[debug]Get Resource Groups 2022-01-07T07:37:42.3743662Z ##[debug]Fetching Resources from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 2022-01-07T07:37:42.3868341Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 with 0-byte payload 2022-01-07T07:37:43.7481035Z ##[debug]received 68616-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:43.8293095Z ##[debug]Fetching properties from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 2022-01-07T07:37:43.8325073Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 with 0-byte payload 2022-01-07T07:37:44.6842282Z ##[debug]received 986-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:44.7085024Z ##[debug]Remove leftover firewall rule 2022-01-07T07:37:44.7265325Z ##[debug]Entering Remove-AzureAnalysisServicesFirewallRule. 2022-01-07T07:37:44.7302770Z ##[debug] endpoint: '@{Url=https://management.azure.com/; Data=; Auth=}' 2022-01-07T07:37:44.7370389Z ##[debug] serverName: 'tas' 2022-01-07T07:37:44.7418438Z ##[debug] firewallRuleName: 'vsts-release-aas-rule' 2022-01-07T07:37:44.7542174Z ##[debug]Removing firewall rule 'vsts-release-aas-rule' on azure analysis services server: tas 2022-01-07T07:37:44.7588070Z ##[debug]Connection type used is ServicePrincipal 2022-01-07T07:37:44.7670540Z ##[debug]Connection type used is ServicePrincipal 2022-01-07T07:37:44.7791119Z ##[debug]Getting azure analysis service properties: 'tas' 2022-01-07T07:37:44.7826586Z ##[debug]Fetching Access Token (spn) 2022-01-07T07:37:44.7860220Z ##[debug]POST https://login.windows.net/***/oauth2/v2.0/token with -1-byte payload 2022-01-07T07:37:44.8411995Z ##[debug]received 1487-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:44.8469887Z ##[debug]Get Resource Groups 2022-01-07T07:37:44.8498239Z ##[debug]Fetching Resources from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 2022-01-07T07:37:44.8530299Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 with 0-byte payload 2022-01-07T07:37:46.1384906Z ##[debug]received 68616-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:46.1613200Z ##[debug]Fetching properties from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 2022-01-07T07:37:46.1651579Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 with 0-byte payload 2022-01-07T07:37:46.3185117Z ##[debug]received 986-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:46.3304481Z ##[debug]Removed firewall rule 'vsts-release-aas-rule' on azure database server: tas 2022-01-07T07:37:46.3345796Z ##[debug]Adding firewall rule 2022-01-07T07:37:46.3660031Z ##[debug]Entering Add-AzureAnalysisServicesFirewallRule. 2022-01-07T07:37:46.3698047Z ##[debug] endpoint: '@{Url=https://management.azure.com/; Data=; Auth=}' 2022-01-07T07:37:46.3775069Z ##[debug] serverName: 'tas' 2022-01-07T07:37:46.3851600Z ##[debug] startIPAddress: '0.0.0.1' 2022-01-07T07:37:46.3957880Z ##[debug] endIPAddress: '255.255.255.254' 2022-01-07T07:37:46.4004213Z ##[debug] firewallRuleName: 'vsts-release-aas-rule' 2022-01-07T07:37:46.4070461Z ##[debug]Creating firewall rule 'vsts-release-aas-rule' 2022-01-07T07:37:46.4123059Z ##[debug]Connection type used is ServicePrincipal 2022-01-07T07:37:46.4183913Z ##[debug]Connection type used is ServicePrincipal 2022-01-07T07:37:46.4236605Z ##[debug]Getting azure analysis service properties: 'tas' 2022-01-07T07:37:46.4250717Z ##[debug]Fetching Access Token (spn) 2022-01-07T07:37:46.4292754Z ##[debug]POST https://login.windows.net/***/oauth2/v2.0/token with -1-byte payload 2022-01-07T07:37:46.5850260Z ##[debug]received 1487-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:46.5903259Z ##[debug]Get Resource Groups 2022-01-07T07:37:46.5939062Z ##[debug]Fetching Resources from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 2022-01-07T07:37:46.5992809Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 with 0-byte payload 2022-01-07T07:37:47.8518633Z ##[debug]received 68616-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:47.9037149Z ##[debug]Fetching properties from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 2022-01-07T07:37:47.9072405Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 with 0-byte payload 2022-01-07T07:37:48.0608016Z ##[debug]received 986-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:48.0728440Z ##[debug]Firewall rule 'vsts-release-aas-rule' created 2022-01-07T07:37:48.0764948Z ##[debug]Loading database from '' 2022-01-07T07:37:48.0833448Z ##[debug]Loading tabular database from file 2022-01-07T07:37:49.0953071Z ##[debug]Loading database 'CustomerInsightTBM' from '' 2022-01-07T07:37:49.1063462Z ##[debug]Loading tabular database from server 2022-01-07T07:37:50.6465368Z ##[debug]Remove firewall rule 2022-01-07T07:37:50.6515129Z ##[debug]Entering Remove-AzureAnalysisServicesFirewallRule. 2022-01-07T07:37:50.6546913Z ##[debug] endpoint: '@{Url=https://management.azure.com/; Data=; Auth=}' 2022-01-07T07:37:50.6578393Z ##[debug] serverName: 'tas' 2022-01-07T07:37:50.6606696Z ##[debug] firewallRuleName: 'vsts-release-aas-rule' 2022-01-07T07:37:50.6643513Z ##[debug]Removing firewall rule 'vsts-release-aas-rule' on azure analysis services server:tas 2022-01-07T07:37:50.6673819Z ##[debug]Connection type used is ServicePrincipal 2022-01-07T07:37:50.6705493Z ##[debug]Connection type used is ServicePrincipal 2022-01-07T07:37:50.6811715Z ##[debug]Getting azure analysis service properties: tas' 2022-01-07T07:37:50.6858428Z ##[debug]Fetching Access Token (spn) 2022-01-07T07:37:50.6936065Z ##[debug]POST https://login.windows.net/***/oauth2/v2.0/token with -1-byte payload 2022-01-07T07:37:51.0228434Z ##[debug]received 1487-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:51.0275633Z ##[debug]Get Resource Groups 2022-01-07T07:37:51.0363588Z ##[debug]Fetching Resources from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 2022-01-07T07:37:51.0404060Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resources?api-version=2014-04-01 with 0-byte payload 2022-01-07T07:37:52.2430209Z ##[debug]received 68616-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:52.2561515Z ##[debug]Fetching properties from https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 2022-01-07T07:37:52.2603326Z ##[debug]GET https://management.azure.com//subscriptions/ada42516-e9cd-4873-9455-bd14dc98cbe5/resourceGroups/trg/providers/Microsoft.AnalysisServices/servers/tas?api-version=2017-08-01 with 0-byte payload 2022-01-07T07:37:52.4104434Z ##[debug]received 986-byte response of content type application/json; charset=utf-8 2022-01-07T07:37:52.4140926Z ##[debug]Removed firewall rule 'vsts-release-aas-rule' on azure database server: tas 2022-01-07T07:37:52.4212962Z ##[debug]Leaving D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\deploy-aas-db.ps1. 2022-01-07T07:37:52.4305501Z ##[debug]Caught exception from task script. 2022-01-07T07:37:52.4398875Z ##[debug]Error record: 2022-01-07T07:37:52.5309746Z ##[debug]D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\deploy-aas-db.ps1 : Error connecting to tabular service. (Exception calling "Connect" with "1" argument(s): "Unable to obtain authentication token using the credentials provided.") 2022-01-07T07:37:52.5342642Z ##[debug]At line:1 char:1 2022-01-07T07:37:52.5363105Z ##[debug]+ . 'D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5 ... 2022-01-07T07:37:52.5386312Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2022-01-07T07:37:52.5474566Z ##[debug] + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException 2022-01-07T07:37:52.5484756Z ##[debug] + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,deploy-aas-db.ps1 2022-01-07T07:37:52.5571260Z ##[debug] 2022-01-07T07:37:52.5602413Z ##[debug]Script stack trace: 2022-01-07T07:37:52.5709085Z ##[debug]at <ScriptBlock>, D:\a\_tasks\deploy-aas-db_a55f5b79-9828-4b7f-9528-85e9e826c028\1.5.5\deploy-aas-db.ps1: line 258 2022-01-07T07:37:52.5734463Z ##[debug]at <ScriptBlock>, <No file>: line 1 2022-01-07T07:37:52.5762996Z ##[debug]at <ScriptBlock>, <No file>: line 22 2022-01-07T07:37:52.5841630Z ##[debug]at <ScriptBlock>, <No file>: line 18 2022-01-07T07:37:52.5865006Z ##[debug]at <ScriptBlock>, <No file>: line 1 2022-01-07T07:37:52.5958250Z ##[debug]Exception: 2022-01-07T07:37:52.6072110Z ##[debug]Microsoft.PowerShell.Commands.WriteErrorException: Error connecting to tabular service. (Exception calling "Connect" with "1" argument(s): "Unable to obtain authentication token using the credentials provided.") 2022-01-07T07:37:52.6200064Z ##[error]Error connecting to tabular service. (Exception calling "Connect" with "1" argument(s): "Unable to obtain authentication token using the credentials provided.") 2022-01-07T07:37:52.6202337Z ##[debug]Processed: ##vso[task.logissue type=error]Error connecting to tabular service. (Exception calling "Connect" with "1" argument(s): "Unable to obtain authentication token using the credentials provided.") 2022-01-07T07:37:52.6225378Z ##[debug]Processed: ##vso[task.complete result=Failed] 2022-01-07T07:37:52.6741901Z ##[section]Finishing: Deploy model

So any reason why with the latest update we are needing additional rights ? And even with admin access those are failing

liprec commented 2 years ago

With the update I made the split between the task clearer: the Service Connection SPN is for changes at the Azure infrastructure, like adding/removing the firewall. And the (optional) provided SPN with the task is for the connection with the AAS/Power BI service. And also with the update there is the option to use only one SPN to handle both parts (use inherit as loginType).

But in your case loading the database from the AAS service is failing with a token error (Unable to obtain authentication token using the credentials provided) which is usually caused by the wrong SPN information. Please validate the tenantId, appId, and appKey that are provided.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.