0
votes

I have a App Service with a managed identity assigned to it to simplify connections to azure resources. I want to use DataProtection where the app stores the xml-keys in an Azure Storage Account(blob).

Whenever I start the app I get a authentication error:

Microsoft.Azure.Storage.StorageException: This request is not authorized to perform this operation.
   at Microsoft.Azure.Storage.Core.Executor.Executor.ExecuteAsync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext, CancellationToken token)
   at Microsoft.Azure.Storage.Core.Executor.Executor.<>c__DisplayClass0_0`1.<ExecuteSync>b__0()
   at Microsoft.Azure.Storage.Core.Util.CommonUtility.RunWithoutSynchronizationContext[T](Func`1 actionToRun)

I have assigned several different RBAC roles to the App Service without any succes.

The Storage Account is connected to a VNET and not open to the internet. THe App service is not connected to the same VNET.

I have then tried to whitelist the App services many outgoing IP-adresses in the Storage Accounts Network-section, but no success.

Any ideas whats missing?