code":"404","message": "Resource not found"

sebastian holst 0 Reputation points
2025-05-01T02:34:24.9933333+00:00

I have an Azure OpenAI resource with a valid GPT deployment (confirmed via Azure Portal), but when making requests via Python (AzureOpenAI SDK) or directly via REST API (/openai/deployments?api-version=2023-05-15), I'm consistently receiving a 404 "DeploymentNotFound" error. I've double-checked the endpoint URL, API version, deployment name, API key, subscription, resource group, and network settings—all are correct and match exactly with the Azure portal details. I'm looking for guidance on why Azure OpenAI is still returning 404 errors despite a confirmed deployment.

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

2 answers

Sort by: Most helpful
  1. Manas Mohanty 3,780 Reputation points Microsoft External Staff Moderator
    2025-05-01T03:37:21.22+00:00

    Hi sebastian holst

    Could you share the model, version and region for repro'ing the case.

    API version

    I think issue might be with API version.

    I could not find mention of 2023-05-15 API version in GA or preview rest API.

    2024-10-01 and 2024-10-21 are latest GA version for Data plane and Control plane (Authoring and inference) respectively.

    API Specs for Preview

    API Specs for GA

    For Virtual network scenario

    1. If the OpenAI is secured with virtual network, we have to check the DNS resolution from VM in same virtual network or once connected with VPN gateways that routes back to virtual network. If it is not resolving, you might need to recreate the private endpoints or fix corrupt DNS records or virtual network links. If a Custom DNS server is in use. You might need to add all C-Records in host server as per your DNS records of your OpenAI resource. nslookup <fqdninDNSrecords> -> private ip as mentioned in DNS record Refernence for Troubleshooting DNS issues - https://learn.microsoft.com/en-us/azure/machine-learning/how-to-troubleshoot-secure-connection-workspace?view=azureml-api-2
    2. If you are trying to access the virtual network resource from public IPs, you might need to whitelist them
    3. Also, please whitelist the Azure OpenAI and other host URLs and ports in firewall and proxy if needed https://learn.microsoft.com/en-us/azure/ai-services/cognitive-services-virtual-networks?tabs=portal

    But ideally, in case of virtual network authentication failures, it throws 403's but sometimes throws 404's too.

    Status on 5th May

    Customer was finally able to resolve the issue at his side after multiple modification in code

    Thank you.

    1 person found this answer helpful.

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.