Azure OpenAI Data privacy

Grison Rivers 20 Reputation points
2024-09-20T09:34:44.8733333+00:00

I'm using Azure OpenAI and am a bit unclear about the privacy aspects. The documentation states that nothing leaves the Azure environment, but when I look at the code in the playground, I notice that the openai library is being imported (as shown below).

Are all my prompts and completions staying within Azure OpenAI as the docs claim, or is any of my data being sent to OpenAI directly?

import os
import openai
openai.api_type = "azure"
openai.api_base = "https://XXXXXXXX.openai.azure.com/"
openai.api_version = "2022-12-01"
openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.Completion.create(

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

Accepted answer
  1. Daniel FANG 705 Reputation points
    2024-09-20T11:41:56.2033333+00:00

    On top of the response from Ashok, if you use the generic OpenAI client but set a Azure api as endpoint, the request data should only be sent to azure. In order to verify (as double check), you can use wire-shark, fiddler or any network monitor to confirm where the http payload is going. Make sure the OpenAI client library you are using are from authentic/well known repo too.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 34,111 Reputation points
    2024-09-20T10:53:52.97+00:00

    Grison Rivers Greetings & Welcome to Microsoft Q&A forum!

    Are all my prompts and completions staying within Azure OpenAI as the docs claim, or is any of my data being sent to OpenAI directly

    As mentioned on the Data, privacy, and security for Azure OpenAI Service page,

    Your prompts (inputs) and completions (outputs), your embeddings, and your training data:

    • are NOT available to other customers.
    • are NOT available to OpenAI.
    • are NOT used to improve OpenAI models.
    • are NOT used to train, retrain, or improve Azure OpenAI Service foundation models.
    • are NOT used to improve any Microsoft or 3rd party products or services without your permission or instruction.
    • Your fine-tuned Azure OpenAI models are available exclusively for your use.

    The Azure OpenAI Service is operated by Microsoft as an Azure service; Microsoft hosts the OpenAI models in Microsoft’s Azure environment and the Service does NOT interact with any services operated by OpenAI (e.g. ChatGPT, or the OpenAI API).

    As a customer, you maintain ownership of data. The content, personal and other data you provide for storing and hosting in Azure services. You are also in control of any additional geographies where you decide to deploy your solutions or replicate your data.

    Also, Azure OpenAI automatically encrypts your data when it's persisted to the cloud. The encryption protects your data and helps you meet your organizational security and compliance commitments.

    Regarding the openai library being imported in the playground, note that Azure OpenAI co-develops the APIs with OpenAI, ensuring compatibility. However, all your prompts and completions stay within Azure OpenAI.

    Do let me know if that helps or have any other queries.


    If the response helped, please do click Accept Answer and Yes for was this answer helpful.

    Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    1 person found this answer helpful.
    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.