I am having an issue deploying a web app build onto the AZ Storage Account. I have checked and the account has a contributor role. Here is the error from a TeamCity build job :
Get-AzStorageContainer : This request is not authorized to perform this
11:19:21 operation.
11:19:21 RequestId:cdea8ffe-201e-0056-7df3-26da53000000
11:19:21 Time:2025-09-16T10:19:21.2777288Z
11:19:21 Status: 403 (This request is not authorized to perform this operation.)
11:19:21 ErrorCode: AuthorizationFailure
11:19:21 Content:
11:19:21 ?<?xml version="1.0"
11:19:21 encoding="utf-8"?><Error><Code>AuthorizationFailure</Code><Message>This
11:19:21 request is not authorized to perform this operation.
11:19:21 RequestId:cdea8ffe-201e-0056-7df3-26da53000000
11:19:21 Time:2025-09-16T10:19:21.2777288Z</Message></Error>
11:19:21 Headers:
11:19:21 x-ms-request-id: cdea8ffe-201e-0056-7df3-26da53000000
11:19:21 x-ms-client-request-id: b9a041b3-454d-4fc8-b1d8-d793ef86f84b
11:19:21 x-ms-error-code: AuthorizationFailure
11:19:21 Date: Tue, 16 Sep 2025 10:19:20 GMT
11:19:21 Server: Microsoft-HTTPAPI/2.0
11:19:21 Content-Length: 246
11:19:21 Content-Type: application/xml
11:19:21 At E:\TeamCityBuildAgent2\work\c08e254461305b37__tcs\UploadDirectoryToAzure.ps
11:19:21 1:70 char:16
11:19:21 + ... $container = Get-AzStorageContainer -Name "`$web" -Context $context
11:19:21 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11:19:21 + CategoryInfo : CloseError: (:) [Get-AzStorageContainer], Reques
11:19:21 tFailedException
11:19:21 + FullyQualifiedErrorId : RequestFailedException,Microsoft.WindowsAzure.Co
11:19:21 mmands.Storage.Blob.Cmdlet.GetAzureStorageContainerCommand
11:19:21
11:19:22 Unable to find $web container
11:19:22 At E:\TeamCityBuildAgent2\work\c08e254461305b37__tcs\UploadDirectoryToAzure.ps
11:19:22 1:72 char:3
11:19:22 + throw "Unable to find `$web container"
11:19:22 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11:19:22 + CategoryInfo : OperationStopped: (Unable to find $web container
11:19:22 :String) [], RuntimeException
11:19:22 + FullyQualifiedErrorId : Unable to find $web container