Unable to Perform HTTP Communication with Azure OpenAI Service - Request Assistance

sahashi 0 Reputation points
2024-11-11T12:46:20.66+00:00

Dear Azure Support Team,

I am experiencing an issue while attempting to perform HTTP communication using the Azure OpenAI Service.

Error Message: 401 Unauthorized "Access denied due to invalid subscription key or wrong API endpoint."

Details of Confirmed Items

API Key

I have tried both Key 1 and Key 2 obtained from the "Keys and Endpoints" section of the Azure portal.

Endpoint

  I am using the endpoint confirmed in the Azure portal (e.g., `https://
Azure OpenAI in Foundry Models
0 comments No comments

2 answers

Sort by: Most helpful
  1. Avinash Devarakonda 615 Reputation points Microsoft External Staff
    2024-11-12T07:28:53.07+00:00

    Hi @sahashi,

    Welcome to Microsoft Q&A Forum, thank you for posting your query here!

    The “401 Unauthorized” error typically indicates a problem with the subscription key or the endpoint. Here are a few steps to help resolve this:

    1. Ensure that the subscription key you are using is correct and has not expired.
    2. Confirm that the endpoint URL you are using matches the one provided in the “Keys and Endpoints” section of your Azure OpenAI resource.
    3. Verify that your API key has the necessary permissions to access the endpoint.
    4. If you’ve checked all these and the issue persists, it might be helpful to regenerate the keys and update your application with the new keys. Additionally, you can refer to the Azure API Management Troubleshooting Guide

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer

    Thank You.

    Was 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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.