Azure OPENAI service is returning "access denied due to firewall/VN rules"

Samriddha Adhikary 0 Reputation points
2023-05-18T15:45:21.3433333+00:00

I was writing a python code to access azure openAI services. It works fine when I allow access from all networks to my openAI instance under the networking tab but when i select the option of allowing access from "selected networks and private endpoints', add a virtual network within the resource group and under the firewall option, add my device's IP address, the python code their the aforementioned error. Anyway that my python code can access the instance without this problem?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,614 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,630 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VasaviLankipalle-MSFT 15,946 Reputation points
    2023-05-18T23:02:46.0333333+00:00

    Hi @Samriddha Adhikary , Thanks for using Microsoft Q&A Platform.

    There could be many reasons affecting this. It's possible that there are some configuration issues with your virtual network or private endpoint that are preventing your Python code from accessing your Azure OpenAI instance.

    To ensure that your virtual network and private endpoint are correctly configured, I would recommend following the steps outlined here: https://learn.microsoft.com/en-us/azure/cognitive-services/cognitive-services-virtual-networks?context=%2Fazure%2Fcognitive-services%2Fopenai%2Fcontext%2Fcontext&tabs=portal

    If you're still having trouble after checking these, please provide more details about the error message or any error logs you're seeing.

    I hope this helps.

    Regards,
    Vasavi

    -Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.

    1 person found this answer helpful.
    0 comments No comments