How to Setup Azure OpenAI for Databricks running into error Error code: 403 - {'error': {'code': '403', 'message': 'Access denied due to Virtual Network/Firewall rules.'}}

TANAPAT KLOMJIT 0 Reputation points
2024-10-16T18:18:51.8966667+00:00

After creating a new resource for Azure OpenAI service , We ran into this error not able to access OpenAI via api_key and endpoint (private) due to the error message indicates that access is denied due to Virtual Network/Firewall rules.

How can we ensure that our Databricks cluster has the necessary network permissions to access the Azure OpenAI service?

We would be gladly appreciated for detailed instruction how to make sure

  • Databricks cluster is configured to allow outbound traffic to the Azure OpenAI endpoint.
  • The necessary firewall rules are set up to permit this traffic.
  • The Azure OpenAI service is configured to accept requests from your Databricks cluster's IP address or virtual network.

Exact error : PermissionDeniedError: Error code: 403 - {'error': {'code': '403', 'message': 'Access denied due to Virtual Network/Firewall rules.'}}

Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
681 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,222 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,259 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 26,366 Reputation points Microsoft Employee
    2024-10-17T04:06:09.4066667+00:00

    @TANAPAT KLOMJIT

    Thank you for reaching out.

    • Have you checked if any particular NSG is blocking the connectivity here? Based on similar implementation here you can check the Other Networking Considerations
    • The question is tagged with Azure Firewall are you using this product in your set-up here?

    Thanks

    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.