0

We are building a custom task within a Azure DevOps extension and we would like to populate a picklist with the available blob containers for the selected storage account.

Within task.json the particular datasource binding is defined as follows:

"dataSourceBindings": [{
  "target": "Containers",
  "endpointId": "$(ConnectedServiceNameARM)",
  "dataSourceName": "AzureStorageContainer",
  "resultTemplate": "{ \"Value\" : \"{{ Name }}\", \"DisplayValue\" : \"{{ Name }}\" }",
  "parameters": {
  "storageAccount": "$(StorageAccountName)"
  }
}]

But when executed during the usage of the task UI, the service endpoint proxy returns the following error:

{
    "result": [],
    "statusCode": "forbidden",
    "errorMessage": "Failed to query service connection API: 'https://mystorageaccount.blob.core.windows.net/?comp=list'. Status Code: 'Forbidden', Response from server: '<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:bf0c79e1-701e-00f7-7417-0fe758000000\nTime:2020-04-10T09:08:53.2050841Z</Message><AuthenticationErrorDetail>The MAC signature found in the HTTP request 'Bv31SGYbznN4gAzUMyrVHV3SfVxDUWHpvD5Zihn6IDM=' is not the same as any computed signature. Server used following string to sign: 'GET\n\n\n\n\n\n\n\n\n\n\n\nx-ms-date:Fri, 10 Apr 2020 09:08:53 GMT\nx-ms-version:2017-04-17\n/mystorageaccount/\ncomp:list'.</AuthenticationErrorDetail></Error>'"
}

What are we doing wrong?

Carl in 't Veld
  • 1,363
  • 2
  • 14
  • 29

0 Answers0