Allow DevOps access to restricted storage account

Anonymous
2022-09-19T19:43:19.617+00:00

We have a storage account that has "Enabled from selected virtual networks and IP addresses", because our security department disallows it from being accessible from the whole internet.

We have a devops deployment that's run on an Azure Pipeline (and we don't want to get a hosted agent).

This deployment fails because of a 403 Forbidden: Creation of storage file share failed with: 'The remote server returned an error: (403) Forbidden.' This occurs because the Azure Pipeline VM that does the deployment, has no access to the storage account. I tried to whitelist the public IP of the Azure Pipeline VM at the start of the deployment. That doesn't solve the problem, because the Azure Pipeline is using the private MS datacenter IP instead of its public IP and you cannot whitelist a private IP unfortunately.

How to temporarily allow the DevOps Azure Pipeline access to a restricted storage account?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,431 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Anonymous
    2022-09-20T08:30:57.07+00:00

    Thanks for your reply, but unfortunately that doesn't work, because when DevOps and the Storage account are in the same region (as they are in our case), MS uses a private IP to connect internally instead of going through the internet. And you cannot whitelist a private IP.

    See also: https://github.com/MicrosoftDocs/azure-devops-docs/issues/8713

    4 people found this answer helpful.

  2. Carlos Solís Salazar 18,171 Reputation points MVP
    2022-09-19T20:34:07.42+00:00

    Hi @Anonymous

    Thank you for asking this question on the **Microsoft Q&A Platform. **

    Please check these documents: Allowed address lists and network connections and get IP addresses of Azure Pipelines to use in production.

    Hope this helps!

    ----------

    Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.
    NOTE: To answer you as quickly as possible, please mention me in your reply.

    1 person found this answer helpful.
    0 comments No comments

  3. Wei 1 Reputation point
    2022-11-29T05:26:03.123+00:00

    Hey @Anonymous

    Have you tried to set 'WEBSITE_CONTENTOVERVNET' to 1 in app settings?

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#website_contentovervnet

    Also please check the deployment history to make sure the error is related to the agent or Microsoft services when creating the logic app.

    My issue was the file share was created by Microsoft Logic App itself, but the network seems to go through the public network.

    After setting 'WEBSITE_CONTENTOVERVNET' to 1, the error is resolved.

    0 comments No comments

  4. Kallen Roman 1 Reputation point
    2024-03-27T08:37:30.5766667+00:00

    I have the same question.

    We don't have access from the Azure DevOps Pipeline to restricted storage account.
    Is there a solution now?


  5. Goyal, Saurabh 0 Reputation points
    2024-08-14T21:03:20.23+00:00

    I have the same issue, did anyone figure out the solution ?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.