How to fix PermissionError: Access denied due to Virtual Network/Firewall rules.

Muhammad Ahsan 15 Reputation points
2023-09-26T08:44:41.4466667+00:00

Hi team,
I am using Azure OpenAI service, I have my endpoint, access key, and deployments all okay but when I try to use OpenAI API's I'm getting "PermissionError: Access denied due to Virtual Network/Firewall rules.” issue. On another laptop I use the same credentials, and also I disable the firewall in Linux (i.e ufw disable) and it works in that system but with the same steps, I'm unable to use API's in my personal laptop.
Then I dockerize my Python service and deploy it in the GCP server, but over there, I'm getting the same issue. Please let me know what the possible issue is because at one place it works but in other places, it is giving the same firewall issue, though I have disabled my firewalls as well.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,487 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,776 Reputation points Microsoft Employee
    2023-09-26T16:51:33.7166667+00:00

    Hi @Muhammad Ahsan

    Welcome to Microsoft Q&A! Thanks for posting the question.

    Are you trying to access your resource secured by a VNET? If yes, then you need to set up some method for your local client to communicate to the VNET, something like VPN or Azure Express Route.

    The general guidelines on Configure Azure AI services virtual networks hold true here as well. Please try checking the documentation and let me know if you still have issues.

    Thanks

    Saurabh


    Please 'Accept as answer' and Upvote if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments